]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generator/issue-53548-1.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / generator / issue-53548-1.rs
1 // A variant of #53548 that does not actually require generators,
2 // but which encountered the same ICE/error. See `issue-53548.rs`
3 // for details.
4 //
5 // check-pass
6
7 use std::cell::RefCell;
8 use std::rc::Rc;
9
10 trait Trait: 'static {}
11
12 struct Store<C> {
13 inner: Rc<RefCell<Option<C>>>,
14 }
15
16 fn main() {
17 let store = Store::<Box<for<'a> fn(&(dyn Trait + 'a))>> {
18 inner: Default::default(),
19 };
20 }