Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
default-method-simple.rs
blob: e5fbedfaece1e6dc84567273c1aa461b1c4a118a [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
dead_code
)]
trait
Foo
{
fn
f
(&
self
)
{
println
!(
"Hello!"
);
self
.
g
();
}
fn
g
(&
self
);
}
struct
A
{
x
:
isize
}
impl
Foo
for
A
{
fn
g
(&
self
)
{
println
!(
"Goodbye!"
);
}
}
pub
fn
main
()
{
let
a
=
A
{
x
:
1
};
a
.
f
();
}