rust/tests/ui/impl-trait/rpit/early_bound.rs
lcnr 5c540044d6 use instantiate_ty_var in nll
we already use `instantiate_const_var`. This does lose some debugging
info for nll because we stop populating the `reg_var_to_origin` table with
`RegionCtxt::Existential(None)`, I don't think that matters however.
Supporting this adds additional complexity to one of the most involved
parts of the type system, so I really don't think it's worth it.
2024-02-17 02:32:19 +01:00

13 lines
287 B
Rust

use std::convert::identity;
fn test<'a: 'a>(n: bool) -> impl Sized + 'a {
//~^ ERROR concrete type differs from previous defining opaque type use
let true = n else { loop {} };
let _ = || {
let _ = identity::<&'a ()>(test(false));
};
loop {}
}
fn main() {}