File tree 3 files changed +9
-7
lines changed
3 files changed +9
-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
+ use std :: lazy :: SyncLazy ;
4
4
5
5
pub mod lint;
6
6
pub use lint:: Level ;
7
7
pub use lint:: Lint ;
8
8
pub use lint:: LINT_LEVELS ;
9
9
10
- lazy_static ! {
10
+ #[ rustfmt:: skip]
11
+ pub static ALL_LINTS : SyncLazy < Vec < Lint > > = SyncLazy :: new ( || {
11
12
// begin lint list, do not remove this comment, it’s used in `update_lints`
12
- pub static ref ALL_LINTS : Vec < Lint > = vec![
13
+ vec ! [
13
14
Lint {
14
15
name: "absurd_extreme_comparisons" ,
15
16
group: "correctness" ,
@@ -2831,6 +2832,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
2831
2832
deprecation: None ,
2832
2833
module: "methods" ,
2833
2834
} ,
2834
- ] ;
2835
+ ]
2835
2836
// end lint list, do not remove this comment, it’s used in `update_lints`
2836
- }
2837
+ } ) ;
You can’t perform that action at this time.
0 commit comments