Sign in
fuchsia
/
third_party
/
rust
/
830bd8b6f4feb8665c8865beb20ffb424e8d8ee6
/
.
/
tests
/
ui
/
nonscalar-cast.rs
blob: 27429b44cd08602fe076164d04e22711cbaa1b5d [
file
] [
log
] [
blame
]
//@ run-rustfix
#[
derive
(
Debug
)]
struct
Foo
{
x
:
isize
}
impl
From
<
Foo
>
for
isize
{
fn
from
(
val
:
Foo
)
->
isize
{
val
.
x
}
}
fn
main
()
{
println
!(
"{}"
,
Foo
{
x
:
1
}
as
isize
);
//~ ERROR non-primitive cast: `Foo` as `isize` [E0605]
}