mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
5c540044d6
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.
13 lines
287 B
Rust
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() {}
|