1
Fork 0
rust/compiler/rustc_lint/src
David Wood 9d864c8d56 macros: add diagnostic derive for lints
`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.
2022-07-05 16:00:21 +01:00
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs lint: port array-into-iter diagnostics 2022-06-30 08:59:19 +01:00
builtin.rs lint: LintDiagnosticBuilder into rustc_errors 2022-07-05 16:00:20 +01:00
context.rs errors: introduce DecorateLint 2022-07-05 16:00:20 +01:00
early.rs Inline and remove {enter,exit}_attrs functions. 2022-06-16 09:52:04 +10:00
enum_intrinsics_non_enums.rs lint: port enum intrinsics diagnostics 2022-06-30 08:59:21 +01:00
expect.rs lint: port expectation diagnostics 2022-06-30 08:59:21 +01:00
hidden_unicode_codepoints.rs lint: port hidden unicode codepoints diagnostics 2022-06-30 08:59:21 +01:00
internal.rs errors: introduce DecorateLint 2022-07-05 16:00:20 +01:00
late.rs Inline and remove {enter,exit}_attrs functions. 2022-06-16 09:52:04 +10:00
levels.rs lint: LintDiagnosticBuilder into rustc_errors 2022-07-05 16:00:20 +01:00
lib.rs Make some lints incremental. 2022-06-19 00:00:36 +02:00
methods.rs lint: port CString ptr diagnostics 2022-06-30 08:59:21 +01:00
non_ascii_idents.rs lint: port non-ascii-idents diagnostics 2022-06-30 08:59:21 +01:00
non_fmt_panic.rs lint: port non-fmt-panic diagnostics 2022-06-30 08:59:21 +01:00
nonstandard_style.rs lint: port non-standard style diagnostics 2022-06-30 08:59:21 +01:00
noop_method_call.rs lint: port no-op method call diagnostics 2022-06-30 08:59:21 +01:00
pass_by_value.rs lint: port pass-by-value diagnostics 2022-06-30 08:59:21 +01:00
passes.rs Do not pass hir::Crate to lints. 2021-09-30 17:39:54 +02:00
redundant_semicolon.rs lint: port redundant semicolons diagnostics 2022-06-30 08:59:21 +01:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs lint: port drop trait/glue diagnostics 2022-06-30 08:59:21 +01:00
types.rs macros: add diagnostic derive for lints 2022-07-05 16:00:21 +01:00
unused.rs lint: port unused allocation diagnostics 2022-06-30 08:59:22 +01:00