From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/self/explicit-self-closures.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/ui/self/explicit-self-closures.rs (limited to 'src/test/ui/self/explicit-self-closures.rs') 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() {} -- cgit v1.2.3