We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#[track_caller]
1 parent 28b2257 commit cc574beCopy full SHA for cc574be
src/librustc_mir/transform/inline.rs
@@ -230,6 +230,11 @@ impl Inliner<'tcx> {
230
231
let codegen_fn_attrs = tcx.codegen_fn_attrs(callsite.callee);
232
233
+ if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::TRACK_CALLER) {
234
+ debug!("`#[track_caller]` present - not inlining");
235
+ return false;
236
+ }
237
+
238
let hinted = match codegen_fn_attrs.inline {
239
// Just treat inline(always) as a hint for now,
240
// there are cases that prevent inlining that we
0 commit comments