Closed
Description
#![feature(type_alias_impl_trait)]
trait Trait<'a, 'b> {}
impl Trait<'_, '_> for () {}
type Tait<'a, 'b> = impl Trait<'a, 'b>;
fn fail<'a: 'b, 'b: 'a>() -> Tait<'a, 'b> {
(|| {})()
}
results in the following but should ideally compile.
error: non-defining opaque type use in defining scope
--> src/main.rs:6:5
|
6 | (|| {})()
| ^^^^^^^^^
|
note: lifetime used multiple times
--> src/main.rs:4:11
|
4 | type Tait<'a, 'b> = impl Trait<'a, 'b>;
| ^^ ^^
Metadata
Metadata
Assignees
Type
Projects
Status
Done