diff options
| author | Rejyr <jerrylwang123@gmail.com> | 2022-10-05 08:23:00 -0400 |
|---|---|---|
| committer | Rejyr <jerrylwang123@gmail.com> | 2023-01-09 17:07:25 -0500 |
| commit | ab66ea61cf4b6f47109d9c24d5a3ce3ea169c60a (patch) | |
| tree | 04118315f2b0ea3ea15c299b51e0794c35818dbe /compiler/rustc_lint/src/lints.rs | |
| parent | f9289c35fb0a6e1ddde9200423cdd7d5dafb0886 (diff) | |
| download | rust-ab66ea61cf4b6f47109d9c24d5a3ce3ea169c60a.tar.gz rust-ab66ea61cf4b6f47109d9c24d5a3ce3ea169c60a.zip | |
add: `emit{,_spanned}_lint` for `LintLevelsBuilder`
add: `emit_spanned_lint` and `emit_lint` for `LintLevelsBuilder` migrate: `DeprecatedLintName`
Diffstat (limited to 'compiler/rustc_lint/src/lints.rs')
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 42deb455b06..942497a1d57 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -49,6 +49,16 @@ pub struct EnumIntrinsicsMemVariant<'a> { pub ty_param: Ty<'a>, } +// levels.rs +#[derive(LintDiagnostic)] +#[diag(lint::deprecated_lint_name)] +pub struct DeprecatedLintName<'a> { + pub name: String, + #[suggestion(code = "{replace}", applicability = "machine-applicable")] + pub suggestion: Span, + pub replace: &'a str, +} + // methods.rs #[derive(LintDiagnostic)] #[diag(lint_cstring_ptr)] |
