mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
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,
|
false,
|
||||||
update_mode == UpdateMode::Change,
|
update_mode == UpdateMode::Change,
|
||||||
|| {
|
|| {
|
||||||
format!("pub static ref ALL_LINTS: Vec<Lint> = vec!{:#?};", sorted_usable_lints)
|
format!("vec!{:#?}", sorted_usable_lints)
|
||||||
.lines()
|
.lines()
|
||||||
.map(ToString::to_string)
|
.map(ToString::to_string)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
#![feature(once_cell)]
|
||||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||||
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
// warn on lints, that are included in `rust-lang/rust`s bootstrap
|
||||||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
#![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 mod lint;
|
||||||
pub use lint::Level;
|
pub use lint::Level;
|
||||||
pub use lint::Lint;
|
pub use lint::Lint;
|
||||||
pub use lint::LINT_LEVELS;
|
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`
|
// begin lint list, do not remove this comment, it’s used in `update_lints`
|
||||||
pub static ref ALL_LINTS: Vec<Lint> = vec![
|
vec![
|
||||||
Lint {
|
Lint {
|
||||||
name: "absurd_extreme_comparisons",
|
name: "absurd_extreme_comparisons",
|
||||||
group: "correctness",
|
group: "correctness",
|
||||||
@ -2831,6 +2832,6 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
|
|||||||
deprecation: None,
|
deprecation: None,
|
||||||
module: "methods",
|
module: "methods",
|
||||||
},
|
},
|
||||||
];
|
]
|
||||||
// end lint list, do not remove this comment, it’s used in `update_lints`
|
// end lint list, do not remove this comment, it’s used in `update_lints`
|
||||||
}
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user