about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/closures/2229_closure_analysis/issue-87987.rs2
-rw-r--r--src/test/ui/closures/2229_closure_analysis/issue-87987.stderr10
-rw-r--r--src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs3
-rw-r--r--src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.stderr22
4 files changed, 4 insertions, 33 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/issue-87987.rs b/src/test/ui/closures/2229_closure_analysis/issue-87987.rs
index 5dc2cb7e710..d4f243ee347 100644
--- a/src/test/ui/closures/2229_closure_analysis/issue-87987.rs
+++ b/src/test/ui/closures/2229_closure_analysis/issue-87987.rs
@@ -8,7 +8,7 @@ struct Props {
 
 fn main() {
     // Test 1
-    let props_2 = Props { //~ WARNING: unused variable: `props_2`
+    let props_2 = Props {
         field_1: 1,
         field_2: 1,
     };
diff --git a/src/test/ui/closures/2229_closure_analysis/issue-87987.stderr b/src/test/ui/closures/2229_closure_analysis/issue-87987.stderr
index aa7012c3618..5828295fae3 100644
--- a/src/test/ui/closures/2229_closure_analysis/issue-87987.stderr
+++ b/src/test/ui/closures/2229_closure_analysis/issue-87987.stderr
@@ -1,11 +1,3 @@
-warning: unused variable: `props_2`
-  --> $DIR/issue-87987.rs:11:9
-   |
-LL |     let props_2 = Props {
-   |         ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_props_2`
-   |
-   = note: `#[warn(unused_variables)]` on by default
-
 warning: field is never read: `field_1`
   --> $DIR/issue-87987.rs:5:5
    |
@@ -20,5 +12,5 @@ warning: field is never read: `field_2`
 LL |     field_2: u32,
    |     ^^^^^^^^^^^^
 
-warning: 3 warnings emitted
+warning: 2 warnings emitted
 
diff --git a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
index 07adbee03f9..dacc2c616b8 100644
--- a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
@@ -43,7 +43,6 @@ fn test3() {
 
 fn test4() {
     let t = (String::from("Hello"), String::from("World"));
-    //~^ WARN unused variable: `t`
 
     let c = ||  {
         let (_, _) = t;
@@ -81,9 +80,7 @@ fn test7() {
 
 fn test8() {
     let x = 0;
-    //~^ WARN unused variable: `x`
     let tup = (1, 2);
-    //~^ WARN unused variable: `tup`
     let p = Point { x: 10, y: 20 };
 
     let c = || {
diff --git a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.stderr b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.stderr
index 6523f2b34d5..7706f68ba5b 100644
--- a/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.stderr
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.stderr
@@ -29,29 +29,11 @@ warning: unused variable: `t2`
 LL |         let (_, t2) = t;
    |                 ^^ help: if this is intentional, prefix it with an underscore: `_t2`
 
-warning: unused variable: `t`
-  --> $DIR/destructure_patterns.rs:45:9
-   |
-LL |     let t = (String::from("Hello"), String::from("World"));
-   |         ^ help: if this is intentional, prefix it with an underscore: `_t`
-
 warning: unused variable: `x`
-  --> $DIR/destructure_patterns.rs:91:21
+  --> $DIR/destructure_patterns.rs:88:21
    |
 LL |         let Point { x, y } = p;
    |                     ^ help: try ignoring the field: `x: _`
 
-warning: unused variable: `x`
-  --> $DIR/destructure_patterns.rs:83:9
-   |
-LL |     let x = 0;
-   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
-
-warning: unused variable: `tup`
-  --> $DIR/destructure_patterns.rs:85:9
-   |
-LL |     let tup = (1, 2);
-   |         ^^^ help: if this is intentional, prefix it with an underscore: `_tup`
-
-warning: 8 warnings emitted
+warning: 5 warnings emitted