mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
9d864c8d56
`SessionDiagnostic` isn't suitable for use on lints as whether or not it creates an error or a warning is decided at compile-time by the macro, whereas lints decide this at runtime based on the location of the lint being reported (as it will depend on the user's `allow`/`deny` attributes, etc). Re-using most of the machinery for `SessionDiagnostic`, this macro introduces a `LintDiagnostic` derive which implements a `DecorateLint` trait, taking a `LintDiagnosticBuilder` and adding to the lint according to the diagnostic struct.
26 lines
910 B
TOML
26 lines
910 B
TOML
[package]
|
|
name = "rustc_lint"
|
|
version = "0.0.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
tracing = "0.1"
|
|
unicode-security = "0.0.5"
|
|
rustc_middle = { path = "../rustc_middle" }
|
|
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
|
rustc_attr = { path = "../rustc_attr" }
|
|
rustc_errors = { path = "../rustc_errors" }
|
|
rustc_hir = { path = "../rustc_hir" }
|
|
rustc_target = { path = "../rustc_target" }
|
|
rustc_ast = { path = "../rustc_ast" }
|
|
rustc_span = { path = "../rustc_span" }
|
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
|
rustc_feature = { path = "../rustc_feature" }
|
|
rustc_index = { path = "../rustc_index" }
|
|
rustc_session = { path = "../rustc_session" }
|
|
rustc_trait_selection = { path = "../rustc_trait_selection" }
|
|
rustc_parse_format = { path = "../rustc_parse_format" }
|
|
rustc_infer = { path = "../rustc_infer" }
|
|
rustc_type_ir = { path = "../rustc_type_ir" }
|
|
rustc_macros = { path = "../rustc_macros" }
|