Sign in
fuchsia
/
third_party
/
rust
/
8035796b9aabf1aa2a711694e40f00fe8a822f40
/
.
/
src
/
test
/
ui
/
nonscalar-cast.rs
blob: 59fcf09666b24f32aa36a63b8029b8acd1064dba [
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]
}