Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
coercion
/
issue-53475.rs
blob: f389169f954051729ed967a49aaac41b23dffeec [
file
] [
log
] [
blame
] [
edit
]
#![
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
()
{}