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