rust/tests/ui/coercion/issue-53475.rs
2023-01-11 09:32:08 +00:00

14 lines
238 B
Rust

#![feature(coerce_unsized)]
use std::any::Any;
use std::ops::CoerceUnsized;
struct Foo<T> {
data: Box<T>,
}
impl<T> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
//~^ ERROR the parameter type `T` may not live long enough
fn main() {}