
By naming them in `[workspace.lints.rust]` in the top-level `Cargo.toml`, and then making all `compiler/` crates inherit them with `[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`, because they're a bit different.) The advantages of this over the current approach: - It uses a standard Cargo feature, rather than special handling in bootstrap. So, easier to understand, and less likely to get accidentally broken in the future. - It works for proc macro crates. It's a shame it doesn't work for rustc-specific lints, as the comments explain.
48 lines
1.4 KiB
TOML
48 lines
1.4 KiB
TOML
[package]
|
|
name = "rustc_pattern_analysis"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
# tidy-alphabetical-start
|
|
rustc-hash = "2.0.0"
|
|
|
|
rustc_abi = { path = "../rustc_abi", optional = true }
|
|
rustc_apfloat = "0.2.0"
|
|
rustc_arena = { path = "../rustc_arena", optional = true }
|
|
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
|
|
rustc_errors = { path = "../rustc_errors", optional = true }
|
|
rustc_fluent_macro = { path = "../rustc_fluent_macro", optional = true }
|
|
rustc_hir = { path = "../rustc_hir", optional = true }
|
|
rustc_index = { path = "../rustc_index", default-features = false }
|
|
rustc_macros = { path = "../rustc_macros", optional = true }
|
|
rustc_middle = { path = "../rustc_middle", optional = true }
|
|
rustc_session = { path = "../rustc_session", optional = true }
|
|
rustc_span = { path = "../rustc_span", optional = true }
|
|
smallvec = { version = "1.8.1", features = ["union"] }
|
|
tracing = "0.1"
|
|
# tidy-alphabetical-end
|
|
|
|
[dev-dependencies]
|
|
tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "ansi"] }
|
|
tracing-tree = "0.3.0"
|
|
|
|
[features]
|
|
default = ["rustc"]
|
|
rustc = [
|
|
"dep:rustc_abi",
|
|
"dep:rustc_arena",
|
|
"dep:rustc_data_structures",
|
|
"dep:rustc_errors",
|
|
"dep:rustc_fluent_macro",
|
|
"dep:rustc_hir",
|
|
"dep:rustc_macros",
|
|
"dep:rustc_middle",
|
|
"dep:rustc_session",
|
|
"dep:rustc_span",
|
|
"smallvec/may_dangle",
|
|
"rustc_index/nightly",
|
|
]
|
|
|
|
[lints]
|
|
workspace = true
|