rust/src/test/ui/issues/issue-5321-immediates-with-bare-self.rs
2019-07-27 18:56:16 +03:00

16 lines
180 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();
}