Fix lint name in unused linker_messages warning

This commit is contained in:
bjorn3 2025-02-27 16:36:20 +00:00
parent 41f1ed11c2
commit cd929bfccb
4 changed files with 6 additions and 6 deletions

View file

@ -811,8 +811,8 @@ passes_unused_duplicate =
passes_unused_empty_lints_note =
attribute `{$name}` with an empty list has no effect
passes_unused_linker_warnings_note =
the `linker_warnings` lint can only be controlled at the root of a crate that needs to be linked
passes_unused_linker_messages_note =
the `linker_messages` lint can only be controlled at the root of a crate that needs to be linked
passes_unused_multiple =
multiple `{$name}` attributes

View file

@ -2388,7 +2388,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
.iter()
.all(|kind| matches!(kind, CrateType::Rlib | CrateType::Staticlib));
if never_needs_link {
errors::UnusedNote::LinkerWarningsBinaryCrateOnly
errors::UnusedNote::LinkerMessagesBinaryCrateOnly
} else {
return;
}

View file

@ -770,8 +770,8 @@ pub(crate) enum UnusedNote {
NoLints { name: Symbol },
#[note(passes_unused_default_method_body_const_note)]
DefaultMethodBodyConst,
#[note(passes_unused_linker_warnings_note)]
LinkerWarningsBinaryCrateOnly,
#[note(passes_unused_linker_messages_note)]
LinkerMessagesBinaryCrateOnly,
}
#[derive(LintDiagnostic)]

View file

@ -16,7 +16,7 @@ warning: unused attribute
LL | #![allow(linker_messages)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: the `linker_warnings` lint can only be controlled at the root of a crate that needs to be linked
= note: the `linker_messages` lint can only be controlled at the root of a crate that needs to be linked
warning: 2 warnings emitted