diff options
| author | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-08 18:39:09 -0500 |
|---|---|---|
| committer | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-23 19:02:14 -0500 |
| commit | a23917cfd07b309f32603c6acb81b63aad8504e7 (patch) | |
| tree | 7ead8d9df7c78555088b9e034441f202ab30d94e /compiler/rustc_lint/src/context/diagnostics.rs | |
| parent | 33422e72c8a66bdb5ee21246a948a1a02ca91674 (diff) | |
| download | rust-a23917cfd07b309f32603c6acb81b63aad8504e7.tar.gz rust-a23917cfd07b309f32603c6acb81b63aad8504e7.zip | |
Add hard error and migration lint for unsafe attrs
Diffstat (limited to 'compiler/rustc_lint/src/context/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_lint/src/context/diagnostics.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/context/diagnostics.rs b/compiler/rustc_lint/src/context/diagnostics.rs index 290bb5173db..adb2a3275c0 100644 --- a/compiler/rustc_lint/src/context/diagnostics.rs +++ b/compiler/rustc_lint/src/context/diagnostics.rs @@ -319,6 +319,16 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: & BuiltinLintDiag::UnusedQualifications { removal_span } => { lints::UnusedQualifications { removal_span }.decorate_lint(diag); } + BuiltinLintDiag::UnsafeAttrOutsideUnsafe { + attribute_name_span, + sugg_spans: (left, right), + } => { + lints::UnsafeAttrOutsideUnsafe { + span: attribute_name_span, + suggestion: lints::UnsafeAttrOutsideUnsafeSuggestion { left, right }, + } + .decorate_lint(diag); + } BuiltinLintDiag::AssociatedConstElidedLifetime { elided, span: lt_span, |
