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