Sign in
android
/
toolchain
/
rustc
/
f7ad1c480b8dc4097ef67cd82ec1c5b706e10950
/
.
/
src
/
test
/
ui
/
coercion
/
issue-53475.rs
blob: 3770c024fb92e040681fa8d515ffa9c00b541c19 [
file
] [
log
] [
blame
]
#![
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
()
{}