rust/tests/mir-opt/inline/cycle.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
305 B
Rust
Raw Normal View History

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// compile-flags: -Zinline-mir-hint-threshold=1000
// EMIT_MIR cycle.f.Inline.diff
2020-12-29 10:21:52 -06:00
#[inline(always)]
fn f(g: impl Fn()) {
g();
}
// EMIT_MIR cycle.g.Inline.diff
2020-12-29 10:21:52 -06:00
#[inline(always)]
fn g() {
f(main);
}
// EMIT_MIR cycle.main.Inline.diff
2020-12-29 10:21:52 -06:00
fn main() {
f(g);
}