Skip to content

Commit 06f56c9

Browse files
delete no_mangle_span
Co-authored-by: bjorn3 <[email protected]>
1 parent 7968195 commit 06f56c9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,10 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
629629
let lang_item =
630630
lang_items::extract(attrs).map_or(None, |(name, _span)| LangItem::from_name(name));
631631
// This should never use the default as `no_mangle` is present in the attributes list
632-
let no_mangle_span = no_mangle_span.unwrap_or_default();
633632
let mut err = tcx
634633
.dcx()
635634
.struct_span_err(
636-
no_mangle_span,
635+
no_mangle_span.unwrap_or_default(),
637636
"`#[no_mangle]` cannot be used on internal language items",
638637
)
639638
.with_note("Rustc requires this item to have a specific mangled name.")

0 commit comments

Comments
 (0)