lintlist.rs: Replace lazy_static with once_cell
Follow-up to https://github.com/rust-lang/rust-clippy/pull/6120
This commit is contained in:
parent
92783e39de
commit
c5774f94ef
@ -29,7 +29,7 @@ pub fn run(update_mode: UpdateMode) {
|
||||
false,
|
||||
update_mode == UpdateMode::Change,
|
||||
|| {
|
||||
format!("pub static ref ALL_LINTS: Vec<Lint> = vec!{:#?};", sorted_usable_lints)
|
||||
format!("vec!{:#?}", sorted_usable_lints)
|
||||
.lines()
|
||||
.map(ToString::to_string)
|
||||
.collect::<Vec<_>>()
|
||||
|
@ -1,4 +1,5 @@
|
||||
#![feature(rustc_private)]
|
||||
#![feature(once_cell)]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
|
@ -1,15 +1,16 @@
|
||||
//! This file is managed by `cargo dev update_lints`. Do not edit.
|
||||
//! This file is managed by `cargo dev update_lints`. Do not edit or format this file.
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use std::lazy::SyncLazy;
|
||||
|
||||
pub mod lint;
|
||||
pub use lint::Level;
|
||||
pub use lint::Lint;
|
||||
pub use lint::LINT_LEVELS;
|
||||
|
||||
lazy_static! {
|
||||
#[rustfmt::skip]
|
||||
pub static ALL_LINTS: SyncLazy<Vec<Lint>> = SyncLazy::new(|| {
|
||||
// begin lint list, do not remove this comment, it’s used in `update_lints`
|
||||
pub static ref ALL_LINTS: Vec<Lint> = vec![
|
||||
vec![
|
||||
Lint {
|
||||
name: "absurd_extreme_comparisons",
|
||||
group: "correctness",
|
||||
@ -2831,6 +2832,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
|
||||
deprecation: None,
|
||||
module: "methods",
|
||||
},
|
||||
];
|
||||
]
|
||||
// end lint list, do not remove this comment, it’s used in `update_lints`
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user