Sign in
rust
/
rust-lang
/
rust
/
refs/heads/stable
/
.
/
tests
/
ui
/
nonscalar-cast.fixed
blob: cb5591dbb9de4624ba3f2473ef56646fe9deaf86 [
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
!(
"{}"
,
isize
::
from
(
Foo
{
x
:
1
}));
//~ ERROR non-primitive cast: `Foo` as `isize` [E0605]
}