about summary refs log tree commit diff
path: root/tests/mir-opt/inline_double_cycle.rs
blob: cf3b87cf0ad302fffc49b22380a42d01eaeb7f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// skip-filecheck
//@ test-mir-pass: Inline
//@ edition: 2021
//@ compile-flags: -Zinline-mir --crate-type=lib

// EMIT_MIR inline_double_cycle.a.Inline.diff
// EMIT_MIR inline_double_cycle.b.Inline.diff

#![feature(fn_traits)]

#[inline]
pub fn a() {
    FnOnce::call_once(a, ());
    FnOnce::call_once(b, ());
}

#[inline]
pub fn b() {
    FnOnce::call_once(b, ());
    FnOnce::call_once(a, ());
}