File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -306,14 +306,15 @@ fn main() {
306306 }
307307
308308 // This is required for internal lints.
309- cmd. arg ( "-Zunstable-options" ) ;
310309 if let Some ( crate_name) = args. windows ( 2 ) . find ( |a| & * a[ 0 ] == "--crate-name" ) {
311310 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" )
316316 {
317+ cmd. arg ( "-Zunstable-options" ) ;
317318 if stage != "0" {
318319 cmd. arg ( "-Wrustc::internal" ) ;
319320 }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub fn is_known(attr: &Attribute) -> bool {
6060}
6161
6262pub 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 )
6464}
6565
6666impl NestedMetaItem {
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ symbols! {
173173 cfg_target_thread_local,
174174 cfg_target_vendor,
175175 char ,
176+ clippy,
176177 clone,
177178 Clone ,
178179 clone_closures,
You can’t perform that action at this time.
0 commit comments