summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5321-immediates-with-bare-self.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-5321-immediates-with-bare-self.rs')
-rw-r--r--tests/ui/issues/issue-5321-immediates-with-bare-self.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-5321-immediates-with-bare-self.rs b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs
new file mode 100644
index 000000000..64aa2836a
--- /dev/null
+++ b/tests/ui/issues/issue-5321-immediates-with-bare-self.rs
@@ -0,0 +1,15 @@
+// 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();
+}