mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
181 B
Rust
15 lines
181 B
Rust
//@ run-pass
|
|
|
|
trait Fooable {
|
|
fn yes(self);
|
|
}
|
|
|
|
impl Fooable for usize {
|
|
fn yes(self) {
|
|
for _ in 0..self { println!("yes"); }
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
2.yes();
|
|
}
|