1
Fork 0

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 = passes_unused_empty_lints_note =
attribute `{$name}` with an empty list has no effect attribute `{$name}` with an empty list has no effect
passes_unused_linker_warnings_note = passes_unused_linker_messages_note =
the `linker_warnings` lint can only be controlled at the root of a crate that needs to be linked the `linker_messages` lint can only be controlled at the root of a crate that needs to be linked
passes_unused_multiple = passes_unused_multiple =
multiple `{$name}` attributes multiple `{$name}` attributes

View file

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

View file

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

View file

@ -16,7 +16,7 @@ warning: unused attribute
LL | #![allow(linker_messages)] LL | #![allow(linker_messages)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 warning: 2 warnings emitted