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
331 B
Rust
Raw Normal View History

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