mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
21 lines
408 B
Rust
21 lines
408 B
Rust
// A variant of #53548 that does not actually require coroutines,
|
|
// but which encountered the same ICE/error. See `issue-53548.rs`
|
|
// for details.
|
|
//
|
|
//@ check-pass
|
|
|
|
use std::cell::RefCell;
|
|
use std::rc::Rc;
|
|
|
|
trait Trait: 'static {}
|
|
|
|
struct Store<C> {
|
|
inner: Rc<RefCell<Option<C>>>,
|
|
}
|
|
|
|
fn main() {
|
|
let store = Store::<Box<for<'a> fn(&(dyn Trait + 'a))>> {
|
|
inner: Default::default(),
|
|
};
|
|
}
|