// Regression test for #128176. Previously we would call `type_of` on the `1` anon const // before the anon const had been lowered and had the `type_of` fed with a result. #![feature(generic_const_exprs)] #![allow(incomplete_features)] trait X { type Y; } const _: () = { fn f2<'a>(arg: Box = &'a ()>>) {} //~^ ERROR the trait `X` is not dyn compatible }; fn main() {}