Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
error-codes
/
E0040.fixed
blob: 22943599804cfe15981dc0880571977178d146d1 [
file
] [
log
] [
blame
] [
edit
]
//@ run-rustfix
struct
Foo
{
x
:
i32
,
}
impl
Drop
for
Foo
{
fn drop
(&
mut
self
)
{
println
!(
"kaboom"
);
}
}
fn main
()
{
let
mut x
=
Foo
{
x
:
-
7
};
x
.
x
=
0
;
println
!(
"{}"
,
x
.
x
);
drop
(
x
);
//~^ ERROR E0040
}