Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
use
/
use-after-move-self-based-on-type.rs
blob: 9325834954f527689f9993d8fbd0adb273b9130a [
file
] [
log
] [
blame
]
struct
S
{
x
:
isize
,
}
impl
Drop
for
S
{
fn
drop
(&
mut
self
)
{}
}
impl
S
{
pub
fn
foo
(
self
)
->
isize
{
self
.
bar
();
return
self
.
x
;
//~ ERROR use of moved value: `self`
}
pub
fn
bar
(
self
)
{}
}
fn
main
()
{
let
x
=
S
{
x
:
1
};
println
!(
"{}"
,
x
.
foo
());
}