File tree 4 files changed +11
-7
lines changed 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub fn run(update_mode: UpdateMode) {
29
29
false ,
30
30
update_mode == UpdateMode :: Change ,
31
31
|| {
32
- format ! ( "pub static ref ALL_LINTS: Vec<Lint> = vec!{:#?}; " , sorted_usable_lints)
32
+ format ! ( "vec!{:#?}" , sorted_usable_lints)
33
33
. lines ( )
34
34
. map ( ToString :: to_string)
35
35
. collect :: < Vec < _ > > ( )
Original file line number Diff line number Diff line change 1
1
#![ feature( rustc_private) ]
2
+ #![ feature( once_cell) ]
2
3
#![ cfg_attr( feature = "deny-warnings" , deny( warnings) ) ]
3
4
// warn on lints, that are included in `rust-lang/rust`s bootstrap
4
5
#![ warn( rust_2018_idioms, unused_lifetimes) ]
Original file line number Diff line number Diff line change 1
- //! This file is managed by `cargo dev update_lints`. Do not edit.
1
+ //! This file is managed by `cargo dev update_lints`. Do not edit or format this file .
2
2
3
- use lazy_static:: lazy_static;
3
+ #![ rustfmt:: skip]
4
+
5
+ use std:: lazy:: SyncLazy ;
4
6
5
7
pub mod lint;
6
8
pub use lint:: Level ;
7
9
pub use lint:: Lint ;
8
10
pub use lint:: LINT_LEVELS ;
9
11
10
- lazy_static ! {
12
+ pub static ALL_LINTS : SyncLazy < Vec < Lint > > = SyncLazy :: new ( || {
11
13
// begin lint list, do not remove this comment, it’s used in `update_lints`
12
- pub static ref ALL_LINTS : Vec < Lint > = vec![
14
+ vec ! [
13
15
Lint {
14
16
name: "absurd_extreme_comparisons" ,
15
17
group: "correctness" ,
@@ -2831,6 +2833,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
2831
2833
deprecation: None ,
2832
2834
module: "methods" ,
2833
2835
} ,
2834
- ] ;
2836
+ ]
2835
2837
// end lint list, do not remove this comment, it’s used in `update_lints`
2836
- }
2838
+ } ) ;
Original file line number Diff line number Diff line change 1
1
#![ cfg_attr( feature = "deny-warnings" , deny( warnings) ) ]
2
2
// warn on lints, that are included in `rust-lang/rust`s bootstrap
3
3
#![ warn( rust_2018_idioms, unused_lifetimes) ]
4
+ #![ feature( once_cell) ]
4
5
5
6
use rustc_tools_util:: VersionInfo ;
6
7
use std:: env;
You can’t perform that action at this time.
0 commit comments