summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs')
-rw-r--r--src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs b/src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
new file mode 100644
index 000000000..477fdd613
--- /dev/null
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
@@ -0,0 +1,11 @@
+// edition:2021
+// check-pass
+#![feature(rustc_attrs)]
+
+fn main() {
+ let mut x = 1;
+ let c = || {
+ drop(&mut x);
+ match x { _ => () }
+ };
+}