mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
14 lines
246 B
Rust
14 lines
246 B
Rust
#![feature(coerce_unsized)]
|
|
|
|
use std::any::Any;
|
|
use std::ops::CoerceUnsized;
|
|
|
|
struct Foo<T: ?Sized> {
|
|
data: Box<T>,
|
|
}
|
|
|
|
impl<T> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
|
|
//~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
fn main() {}
|