Skip to content

Commit e4ff49d

Browse files
committed
Treat inline(always) as inline(usually)
1 parent a9ad089 commit e4ff49d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
543543
.emit();
544544
InlineAttr::None
545545
} else if list_contains_name(items, sym::always) {
546-
InlineAttr::Always
546+
InlineAttr::Usually
547547
} else if list_contains_name(items, sym::never) {
548548
InlineAttr::Never
549549
} else if list_contains_name(items, sym::usually) {

compiler/rustc_middle/src/mir/mono.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl<'tcx> MonoItem<'tcx> {
138138
// conflict with upstream crates as it could be an exported
139139
// symbol.
140140
match tcx.codegen_fn_attrs(instance.def_id()).inline {
141-
InlineAttr::Always | InlineAttr::Usually => InstantiationMode::LocalCopy,
141+
InlineAttr::Always => InstantiationMode::LocalCopy,
142142
_ => InstantiationMode::GloballyShared { may_conflict: true },
143143
}
144144
}

0 commit comments

Comments
 (0)