Sign in
fuchsia
/
third_party
/
rust
/
846ea58cd5ae1c8d72e55dd6cf1ee35ffbca3d63
/
.
/
src
/
test
/
ui
/
use
/
use-after-move-self.rs
blob: 1337d61a6d8e8ddd538f953ef85f6ffa97a58823 [
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.x`
}
pub
fn
bar
(
self
)
{}
}
fn
main
()
{
let
x
=
S
{
x
:
box
1
};
println
!(
"{}"
,
x
.
foo
());
}