blob: 39ca77d13db99b848f63b90ba730752c44180feb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// check-pass
#![feature(generic_associated_types)]
pub trait Fooey: Sized {
type Context<'c> where Self: 'c;
}
pub struct Handle<E: Fooey>(Option<Box<dyn for<'c> Fn(&mut E::Context<'c>)>>);
fn tuple<T>() -> (Option<T>,) { (Option::None,) }
pub struct FooImpl {}
impl Fooey for FooImpl {
type Context<'c> = &'c ();
}
impl FooImpl {
pub fn fail1() -> Handle<Self> {
let (tx,) = tuple();
Handle(tx)
}
}
fn main() {}
|