]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-13808.rs
New upstream version 1.67.1+dfsg1
[rustc.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 }