2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2014-12-22 23:20:31 -06:00
|
|
|
struct Foo<'a> {
|
2019-05-28 13:47:21 -05:00
|
|
|
listener: Box<dyn FnMut() + 'a>,
|
2014-12-22 23:20:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Foo<'a> {
|
2015-01-02 16:32:54 -06:00
|
|
|
fn new<F>(listener: F) -> Foo<'a> where F: FnMut() + 'a {
|
2015-02-15 02:52:21 -06:00
|
|
|
Foo { listener: Box::new(listener) }
|
2014-12-22 23:20:31 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = Foo::new(|| {});
|
|
|
|
}
|