
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.
30 lines
669 B
TOML
30 lines
669 B
TOML
[package]
|
|
name = "rustc_transmute"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
# tidy-alphabetical-start
|
|
rustc_abi = { path = "../rustc_abi", optional = true }
|
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
|
rustc_hir = { path = "../rustc_hir", optional = true }
|
|
rustc_middle = { path = "../rustc_middle", optional = true }
|
|
rustc_span = { path = "../rustc_span", optional = true }
|
|
tracing = "0.1"
|
|
# tidy-alphabetical-end
|
|
|
|
[features]
|
|
rustc = [
|
|
"dep:rustc_abi",
|
|
"dep:rustc_hir",
|
|
"dep:rustc_middle",
|
|
"dep:rustc_span",
|
|
]
|
|
|
|
[dev-dependencies]
|
|
# tidy-alphabetical-start
|
|
itertools = "0.12"
|
|
# tidy-alphabetical-end
|
|
|
|
[lints]
|
|
workspace = true
|