// check-pass // compile-flags: --emit=mir,link -O // There is an ICE somewhere in type normalization, and we are hitting it during // the MIR inlining pass on this code. // // Long term, we should fix that ICE and change the compile-flags for this test // to explicitly enable MIR inlining. // // Short term, we are diabling MIR inlining for Rust 1.64-beta, so that we avoid // this ICE in this instance. pub trait Trait { type Associated; } impl Trait for T { type Associated = T; } pub struct Struct(::Associated); pub fn foo() -> Struct where T: Trait, { bar() } #[inline] fn bar() -> Struct { Struct(baz()) } fn baz() -> T { unimplemented!() } fn main() { }