Skip to content

Commit 8f4622d

Browse files
sassmanUrgau
andauthored
Apply suggestions from code review
commit suggestion of not always pretty printing Co-authored-by: Urgau <[email protected]>
1 parent 1696f53 commit 8f4622d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: compiler/rustc_codegen_ssa/src/codegen_attrs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
120120
mixed_export_name_no_mangle_lint_state.track_no_mangle(
121121
attr.span,
122122
tcx.local_def_id_to_hir_id(did),
123-
rustc_ast_pretty::pprust::attribute_to_string(attr),
123+
attr,
124124
);
125125
} else {
126126
tcx.dcx()
@@ -792,7 +792,7 @@ struct MixedExportNameAndNoMangleState {
792792
export_name: Option<Span>,
793793
hir_id: Option<HirId>,
794794
no_mangle: Option<Span>,
795-
no_mangle_attr_name: Option<String>,
795+
no_mangle_attr: Option<&'a ast::Attribute>,
796796
}
797797

798798
impl MixedExportNameAndNoMangleState {
@@ -821,7 +821,7 @@ impl MixedExportNameAndNoMangleState {
821821
no_mangle,
822822
errors::MixedExportNameAndNoMangle {
823823
no_mangle,
824-
no_mangle_attr: no_mangle_attr_name,
824+
no_mangle_attr: rustc_ast_pretty::pprust::attribute_to_string(no_mangle_attr),
825825
export_name,
826826
removal_span: no_mangle,
827827
},

0 commit comments

Comments
 (0)