Make extern blocks without unsafe warn in edition 2024
This commit is contained in:
parent
46cd80b691
commit
3ba8de0b60
10 changed files with 78 additions and 7 deletions
|
@ -462,6 +462,8 @@ lint_metavariable_wrong_operator = meta-variable repeats with different Kleene o
|
|||
|
||||
lint_missing_fragment_specifier = missing fragment specifier
|
||||
|
||||
lint_missing_unsafe_on_extern = extern blocks should be unsafe
|
||||
|
||||
lint_mixed_script_confusables =
|
||||
the usage of Script Group `{$set}` in this crate consists solely of mixed script confusables
|
||||
.includes_note = the usage includes {$includes}
|
||||
|
|
|
@ -205,6 +205,9 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
|
|||
};
|
||||
lints::DeprecatedWhereClauseLocation { suggestion }.decorate_lint(diag);
|
||||
}
|
||||
BuiltinLintDiag::MissingUnsafeOnExtern => {
|
||||
lints::MissingUnsafeOnExtern.decorate_lint(diag);
|
||||
}
|
||||
BuiltinLintDiag::SingleUseLifetime {
|
||||
param_span,
|
||||
use_span: Some((use_span, elide)),
|
||||
|
|
|
@ -2738,6 +2738,10 @@ pub enum DeprecatedWhereClauseLocationSugg {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_missing_unsafe_on_extern)]
|
||||
pub struct MissingUnsafeOnExtern;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_single_use_lifetime)]
|
||||
pub struct SingleUseLifetime {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue