-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
#![feature(type_alias_impl_trait)]
type Tait<'a> = impl Sized;
fn prove()
where
for<'a> Tait<'a>: Sized,
{}
#[define_opaque(Tait)]
fn foo<'a>() -> &'a Tait<'a> {
prove();
&()
}
fn main() {}
results in
error: internal compiler error: unexpected cyclic definition of `Tait::{opaque#0}`
--> src/main.rs:11:5
|
11 | prove();
| ^^^^^^^
|
note: delayed at compiler/rustc_hir_typeck/src/opaque_types.rs:239:24 - disabled backtrace
--> src/main.rs:11:5
|
11 | prove();
| ^^^^^^^
it shouldn't xd
The issue is that each time we prove for<'a> Tait<'a>: Sized
we add a new use of Tait<!aN>
to the opaque types storage, cc #204 and #220
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
potentially irrelevant