Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
use
/
use-after-move-self.rs
blob: a6f6c45573d0ac80c83875887118535275bfc077 [
file
] [
log
] [
blame
]
#![
feature
(
box_syntax
)]
struct
S
{
x
:
Box
<
isize
>,
}
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
:
box
1
};
println
!(
"{}"
,
x
.
foo
());
}