// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Checks that code with exponential runtime does not have exponential behavior in inlining. trait A { fn call(); } trait B { fn call(); } impl B for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } trait C { fn call(); } impl C for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } trait D { fn call(); } impl D for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } trait E { fn call(); } impl E for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } trait F { fn call(); } impl F for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } trait G { fn call(); } impl G for T { #[inline] fn call() { ::call(); ::call(); ::call(); } } impl A for () { #[inline(never)] fn call() {} } // EMIT_MIR exponential_runtime.main.Inline.diff fn main() { <() as G>::call(); }