]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-13808.rs
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
[rust.git] / src / test / ui / issues / issue-13808.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_variables)]
4 // pretty-expanded FIXME #23616
5
6 struct Foo<'a> {
7     listener: Box<dyn FnMut() + 'a>,
8 }
9
10 impl<'a> Foo<'a> {
11     fn new<F>(listener: F) -> Foo<'a> where F: FnMut() + 'a {
12         Foo { listener: Box::new(listener) }
13     }
14 }
15
16 fn main() {
17     let a = Foo::new(|| {});
18 }