about summary refs log tree commit diff
diff options
context:
space:
mode:
authorinfrandomness <infrandomness@gmail.com>2022-04-09 18:35:18 +0200
committerinfrandomness <infrandomness@gmail.com>2022-04-14 13:16:06 +0200
commit8b2b343b23c50e136e14c303f2579ae2a2fda5f2 (patch)
treedb89bcabe102cc0d04b7496f9a1f5a5ef8e83be4
parentcf83e18106160382cd86cc8b35add250373491b6 (diff)
downloadrust-8b2b343b23c50e136e14c303f2579ae2a2fda5f2.tar.gz
rust-8b2b343b23c50e136e14c303f2579ae2a2fda5f2.zip
Delete unused variable `y` in test
This fixes the errors occuring while running the ui tests
-rw-r--r--tests/ui/needless_option_take.rs2
-rw-r--r--tests/ui/option_take_on_temporary.fixed2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/needless_option_take.rs b/tests/ui/needless_option_take.rs
index eb57ffeab45..27cc9a2e61e 100644
--- a/tests/ui/needless_option_take.rs
+++ b/tests/ui/needless_option_take.rs
@@ -3,5 +3,5 @@
 fn main() {
     println!("Testing option_take_on_temporary");
     let x = Some(3);
-    let y = x.as_ref().take();
+    x.as_ref().take();
 }
diff --git a/tests/ui/option_take_on_temporary.fixed b/tests/ui/option_take_on_temporary.fixed
index 9b4ca5a4ad1..7e293076682 100644
--- a/tests/ui/option_take_on_temporary.fixed
+++ b/tests/ui/option_take_on_temporary.fixed
@@ -3,5 +3,5 @@
 fn main() {
     println!("Testing option_take_on_temporary");
     let x = Some(3);
-    let y = x.as_ref();
+    x.as_ref();
 }