Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
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]
}