Sign in
android
/
toolchain
/
rustc
/
ff3f07ae99a30006dd85b9d73084edd9355c9db6
/
.
/
src
/
test
/
run-pass
/
self
/
move-self.rs
blob: 66032780b812ab6221320d54da7d24cdc4c14b05 [
file
] [
log
] [
blame
]
// run-pass
struct
S
{
x
:
String
}
impl
S
{
pub
fn
foo
(
self
)
{
self
.
bar
();
}
pub
fn
bar
(
self
)
{
println
!(
"{}"
,
self
.
x
);
}
}
pub
fn
main
()
{
let
x
=
S
{
x
:
"Hello!"
.
to_string
()
};
x
.
foo
();
}