Skip to content

Commit d94c483

Browse files
committed
Make overrides a prefix and add a debug print
1 parent 0dfc4d7 commit d94c483

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_codegen_llvm/src/attributes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
368368
(inline, _) => inline,
369369
};
370370
if cx.tcx.has_inline_always_override(instance) {
371+
eprintln!("Applying override");
371372
to_add.extend(inline_attr(cx, InlineAttr::Always));
372373
} else {
373374
to_add.extend(inline_attr(cx, inline));

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3401,7 +3401,7 @@ impl<'tcx> TyCtxt<'tcx> {
34013401
return false;
34023402
};
34033403
let symbol_name = self.symbol_name(instance).name;
3404-
overrides.iter().any(|o| o == symbol_name)
3404+
overrides.iter().any(|o| symbol_name.starts_with(o))
34053405
}
34063406
}
34073407

0 commit comments

Comments
 (0)