Skip to content

Commit 6314bd7

Browse files
committed
fix(codegen): Use body_codegen_attrs for caller in adjust_target_feature_sig
1 parent e0cb264 commit 6314bd7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_middle/src/ty/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,8 +1330,8 @@ impl<'tcx> TyCtxt<'tcx> {
13301330
caller: DefId,
13311331
) -> Option<ty::Binder<'tcx, ty::FnSig<'tcx>>> {
13321332
let fun_features = &self.codegen_fn_attrs(fun_def).target_features;
1333-
let callee_features = &self.codegen_fn_attrs(caller).target_features;
1334-
if self.is_target_feature_call_safe(&fun_features, &callee_features) {
1333+
let caller_features = &self.body_codegen_attrs(caller).target_features;
1334+
if self.is_target_feature_call_safe(&fun_features, &caller_features) {
13351335
return Some(fun_sig.map_bound(|sig| ty::FnSig { safety: hir::Safety::Safe, ..sig }));
13361336
}
13371337
None

0 commit comments

Comments
 (0)