move Lint static def into its own module
This commit is contained in:
parent
f6367c41dc
commit
5abcff2be5
@ -95,20 +95,13 @@ fn update_lints(update_mode: &UpdateMode) {
|
||||
sorted_usable_lints.sort_by_key(|lint| lint.name.clone());
|
||||
|
||||
std::fs::write(
|
||||
"../src/lintlist.rs",
|
||||
"../src/lintlist/mod.rs",
|
||||
&format!(
|
||||
"\
|
||||
//! This file is managed by util/dev update_lints. Do not edit.
|
||||
|
||||
/// Lint data parsed from the Clippy source code.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct Lint {{
|
||||
pub name: &'static str,
|
||||
pub group: &'static str,
|
||||
pub desc: &'static str,
|
||||
pub deprecation: Option<&'static str>,
|
||||
pub module: &'static str,
|
||||
}}
|
||||
mod lint;
|
||||
use lint::Lint;
|
||||
|
||||
pub const ALL_LINTS: [Lint; {}] = {:#?};\n",
|
||||
sorted_usable_lints.len(),
|
||||
|
9
src/lintlist/lint.rs
Normal file
9
src/lintlist/lint.rs
Normal file
@ -0,0 +1,9 @@
|
||||
/// Lint data parsed from the Clippy source code.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct Lint {
|
||||
pub name: &'static str,
|
||||
pub group: &'static str,
|
||||
pub desc: &'static str,
|
||||
pub deprecation: Option<&'static str>,
|
||||
pub module: &'static str,
|
||||
}
|
@ -1,14 +1,7 @@
|
||||
//! This file is managed by util/dev update_lints. Do not edit.
|
||||
|
||||
/// Lint data parsed from the Clippy source code.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct Lint {
|
||||
pub name: &'static str,
|
||||
pub group: &'static str,
|
||||
pub desc: &'static str,
|
||||
pub deprecation: Option<&'static str>,
|
||||
pub module: &'static str,
|
||||
}
|
||||
mod lint;
|
||||
use lint::Lint;
|
||||
|
||||
pub const ALL_LINTS: [Lint; 304] = [
|
||||
Lint {
|
Loading…
Reference in New Issue
Block a user