summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/issue-41962.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/issue-41962.rs')
-rw-r--r--tests/ui/borrowck/issue-41962.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/borrowck/issue-41962.rs b/tests/ui/borrowck/issue-41962.rs
new file mode 100644
index 000000000..38a01b138
--- /dev/null
+++ b/tests/ui/borrowck/issue-41962.rs
@@ -0,0 +1,9 @@
+pub fn main(){
+ let maybe = Some(vec![true, true]);
+
+ loop {
+ if let Some(thing) = maybe {
+ }
+ //~^^ ERROR use of moved value [E0382]
+ }
+}