rust/tests/ui/issues/issue-13808.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
329 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
// pretty-expanded FIXME #23616
struct Foo<'a> {
2019-05-28 13:47:21 -05:00
listener: Box<dyn FnMut() + 'a>,
}
impl<'a> Foo<'a> {
2015-01-02 16:32:54 -06:00
fn new<F>(listener: F) -> Foo<'a> where F: FnMut() + 'a {
Foo { listener: Box::new(listener) }
}
}
fn main() {
let a = Foo::new(|| {});
}