Sign in
fuchsia
/
third_party
/
rust
/
2a3e17c6d5c49eeb770ade2fa660f98e9cce0ce0
/
.
/
tests
/
ui
/
nonscalar-cast.rs
blob: 71e7c43a1db0990369ae503d7e5cbe5f377cb249 [
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
);
//~ non-primitive cast: `Foo` as `isize` [E0605]
}