Skip to content

Commit

Permalink
refactor: Make lint names snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
Muscraft committed Mar 24, 2024
1 parent 77506e5 commit 222826f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cargo/util/lints.rs
Expand Up @@ -67,7 +67,7 @@ pub struct LintGroup {
}

const RUST_2024_COMPATIBILITY: LintGroup = LintGroup {
name: "rust-2024-compatibility",
name: "rust_2024_compatibility",
default_level: LintLevel::Allow,
desc: "warn about compatibility with Rust 2024",
edition_lint_opts: Some((Edition::Edition2024, LintLevel::Deny)),
Expand Down Expand Up @@ -150,7 +150,7 @@ impl From<TomlLintLevel> for LintLevel {
/// [RFC #3143]: https://rust-lang.github.io/rfcs/3143-cargo-weak-namespaced-features.html
/// [RFC #3491]: https://rust-lang.github.io/rfcs/3491-remove-implicit-features.html
const IMPLICIT_FEATURES: Lint = Lint {
name: "implicit-features",
name: "implicit_features",
desc: "warn about the use of unstable features",
groups: &[RUST_2024_COMPATIBILITY],
default_level: LintLevel::Allow,
Expand Down
Expand Up @@ -19,7 +19,7 @@ edition = "2021"
bar = { version = "0.1.0", optional = true }
[lints.cargo]
implicit-features = "warn"
implicit_features = "warn"
"#,
)
.file("src/lib.rs", "")
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/lints/implicit_features/warn/mod.rs
Expand Up @@ -20,7 +20,7 @@ edition = "2024"
bar = { version = "0.1.0", optional = true }
[lints.cargo]
implicit-features = "warn"
implicit_features = "warn"
"#,
)
.file("src/lib.rs", "")
Expand Down
Expand Up @@ -19,7 +19,7 @@ edition = "2021"
bar = { version = "0.1.0", optional = true }
[lints.cargo]
rust-2024-compatibility = "warn"
rust_2024_compatibility = "warn"
"#,
)
.file("src/lib.rs", "")
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/lints/rust_2024_compatibility/warn/mod.rs
Expand Up @@ -20,7 +20,7 @@ edition = "2024"
bar = { version = "0.1.0", optional = true }
[lints.cargo]
rust-2024-compatibility = "warn"
rust_2024_compatibility = "warn"
"#,
)
.file("src/lib.rs", "")
Expand Down

0 comments on commit 222826f

Please sign in to comment.