blob: 962606508be7a492acf0fee3abf3b22f72c182b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//check-pass
#![feature(type_alias_impl_trait)]
trait Trait {
type Opaque1;
type Opaque2;
fn constrain(self);
}
impl<'a> Trait for &'a () {
type Opaque1 = impl Sized;
type Opaque2 = impl Sized + 'a;
fn constrain(self) {
let _: Self::Opaque1 = ();
let _: Self::Opaque2 = self;
}
}
fn main() {}
|