Rollup merge of #145274 - compiler-errors:unused-must-use, r=fmease

Remove unused `#[must_use]`

Self-explanatory

Fixes https://github.com/rust-lang/rust/issues/145257
This commit is contained in:
Jakub Beránek
2025-08-13 07:03:49 +02:00
committed by GitHub
13 changed files with 366 additions and 206 deletions

View File

@@ -1622,7 +1622,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
UNUSED_ATTRIBUTES,
hir_id,
attr_span,
errors::MustUseNoEffect { article, target },
errors::MustUseNoEffect { article, target, attr_span },
);
}

View File

@@ -469,6 +469,8 @@ pub(crate) struct FfiConstInvalidTarget {
pub(crate) struct MustUseNoEffect {
pub article: &'static str,
pub target: rustc_hir::Target,
#[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
pub attr_span: Span,
}
#[derive(Diagnostic)]