summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/issue-53475.rs
blob: 3770c024fb92e040681fa8d515ffa9c00b541c19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![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() {}