Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
nonscalar-cast.fixed
blob: f6154222ca22fb5c8859f44cfa708feb7a9580e2 [
file
] [
log
] [
blame
] [
edit
]
//@ run-rustfix
#[derive(Debug)]
struct
Foo
{
x
:
isize
}
impl
From
<
Foo
>
for
isize
{
fn
from
(
val
:
Foo
)
->
isize
{
val
.
x
}
}
fn main
()
{
println
!(
"{}"
,
isize
::
from
(
Foo
{
x
:
1
}));
//~ non-primitive cast: `Foo` as `isize` [E0605]
}