blob: 551815d021a0a849a5dc6ece871b4f766d9e255a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//check-pass
#![feature(impl_trait_in_assoc_type)]
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() {}
|