Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f32294a

Browse files
committedFeb 27, 2025
Fix lint name in unused linker_messages warning
1 parent 5014353 commit f32294a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎compiler/rustc_passes/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,8 @@ passes_unused_duplicate =
801801
passes_unused_empty_lints_note =
802802
attribute `{$name}` with an empty list has no effect
803803
804-
passes_unused_linker_warnings_note =
805-
the `linker_warnings` lint can only be controlled at the root of a crate that needs to be linked
804+
passes_unused_linker_messages_note =
805+
the `linker_messages` lint can only be controlled at the root of a crate that needs to be linked
806806
807807
passes_unused_multiple =
808808
multiple `{$name}` attributes

‎compiler/rustc_passes/src/check_attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
23822382
.iter()
23832383
.all(|kind| matches!(kind, CrateType::Rlib | CrateType::Staticlib));
23842384
if never_needs_link {
2385-
errors::UnusedNote::LinkerWarningsBinaryCrateOnly
2385+
errors::UnusedNote::LinkerMessagesBinaryCrateOnly
23862386
} else {
23872387
return;
23882388
}

‎compiler/rustc_passes/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,8 @@ pub(crate) enum UnusedNote {
770770
NoLints { name: Symbol },
771771
#[note(passes_unused_default_method_body_const_note)]
772772
DefaultMethodBodyConst,
773-
#[note(passes_unused_linker_warnings_note)]
774-
LinkerWarningsBinaryCrateOnly,
773+
#[note(passes_unused_linker_messages_note)]
774+
LinkerMessagesBinaryCrateOnly,
775775
}
776776

777777
#[derive(LintDiagnostic)]

0 commit comments

Comments
 (0)
Failed to load comments.