summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-20186.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-20186.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-20186.rs b/src/test/ui/issues/issue-20186.rs
new file mode 100644
index 000000000..54d68f100
--- /dev/null
+++ b/src/test/ui/issues/issue-20186.rs
@@ -0,0 +1,16 @@
+// check-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+struct Foo;
+
+impl Foo {
+ fn putc(&self, b: u8) { }
+
+ fn puts(&self, s: &str) {
+ for byte in s.bytes() {
+ self.putc(byte)
+ }
+ }
+}
+
+fn main() {}