Files
rust/tests/ui/traits/trait-implementation-for-usize-5321.rs

18 lines
231 B
Rust
Raw Normal View History

//@ run-pass
2013-06-19 19:49:23 -04:00
trait Fooable {
fn yes(self);
}
impl Fooable for usize {
2013-06-19 19:49:23 -04:00
fn yes(self) {
for _ in 0..self { println!("yes"); }
2013-06-19 19:49:23 -04:00
}
}
pub fn main() {
2013-06-19 19:49:23 -04:00
2.yes();
}
2025-07-13 15:56:27 -04:00
// https://github.com/rust-lang/rust/issues/5321