File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -306,14 +306,15 @@ fn main() {
306
306
}
307
307
308
308
// This is required for internal lints.
309
- cmd. arg ( "-Zunstable-options" ) ;
310
309
if let Some ( crate_name) = args. windows ( 2 ) . find ( |a| & * a[ 0 ] == "--crate-name" ) {
311
310
let crate_name = crate_name[ 1 ] . to_string_lossy ( ) ;
312
- if crate_name. starts_with ( "rustc" )
313
- || crate_name. starts_with ( "syntax" )
314
- || crate_name == "arena"
315
- || crate_name == "fmt_macros"
311
+ if crate_name != "rustc_version"
312
+ && ( crate_name. starts_with ( "rustc" )
313
+ || crate_name. starts_with ( "syntax" )
314
+ || crate_name == "arena"
315
+ || crate_name == "fmt_macros" )
316
316
{
317
+ cmd. arg ( "-Zunstable-options" ) ;
317
318
if stage != "0" {
318
319
cmd. arg ( "-Wrustc::internal" ) ;
319
320
}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub fn is_known(attr: &Attribute) -> bool {
60
60
}
61
61
62
62
pub fn is_known_lint_tool ( m_item : Ident ) -> bool {
63
- [ " clippy" , " rustc" ] . contains ( & m_item. as_str ( ) . as_ref ( ) )
63
+ [ sym :: clippy, sym :: rustc] . contains ( & m_item. name )
64
64
}
65
65
66
66
impl NestedMetaItem {
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ symbols! {
173
173
cfg_target_thread_local,
174
174
cfg_target_vendor,
175
175
char ,
176
+ clippy,
176
177
clone,
177
178
Clone ,
178
179
clone_closures,
You can’t perform that action at this time.
0 commit comments