2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2013-06-19 19:49:23 -04:00
|
|
|
|
|
|
|
trait Fooable {
|
|
|
|
fn yes(self);
|
|
|
|
}
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
impl Fooable for usize {
|
2013-06-19 19:49:23 -04:00
|
|
|
fn yes(self) {
|
2015-01-26 15:46:12 -05:00
|
|
|
for _ in 0..self { println!("yes"); }
|
2013-06-19 19:49:23 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2013-06-19 19:49:23 -04:00
|
|
|
2.yes();
|
|
|
|
}
|