Sign in
fuchsia
/
third_party
/
rust
/
7de9402b77ded0d8ec9e1c554521b2121449ef2b
/
.
/
src
/
test
/
ui
/
traits
/
traits-default-method-self.rs
blob: cdf4d1e148c8402d401e17760f42c4d4300b0d8f [
file
] [
log
] [
blame
]
// run-pass
trait
Cat
{
fn
meow
(&
self
)
->
bool
;
fn
scratch
(&
self
)
->
bool
{
self
.
purr
()
}
fn
purr
(&
self
)
->
bool
{
true
}
}
impl
Cat
for
isize
{
fn
meow
(&
self
)
->
bool
{
self
.
scratch
()
}
}
pub
fn
main
()
{
assert
!(
5.meow
());
}