summaryrefslogtreecommitdiffstats
path: root/src/test/ui/self/explicit-self-closures.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/self/explicit-self-closures.rs')
-rw-r--r--src/test/ui/self/explicit-self-closures.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/self/explicit-self-closures.rs b/src/test/ui/self/explicit-self-closures.rs
new file mode 100644
index 000000000..b409dfd7a
--- /dev/null
+++ b/src/test/ui/self/explicit-self-closures.rs
@@ -0,0 +1,17 @@
+// build-pass (FIXME(62277): could be check-pass?)
+#![allow(dead_code)]
+// Test to make sure that explicit self params work inside closures
+
+// pretty-expanded FIXME #23616
+
+struct Box {
+ x: usize
+}
+
+impl Box {
+ pub fn set_many(&mut self, xs: &[usize]) {
+ for x in xs { self.x = *x; }
+ }
+}
+
+pub fn main() {}