about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-24 12:40:28 +0000
committerbors <bors@rust-lang.org>2023-03-24 12:40:28 +0000
commitd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079 (patch)
treeb9f03cf76c94909b99a49d8ae1a06b9eb94f14ac /tests/ui
parentc72c914d21264653006dc572dba1022c6577eb81 (diff)
parent8134414e03f6ddedf95d96758251124082dbe164 (diff)
downloadrust-d5e2a7aca55ed49fc943b7a07a8eba05ab5a0079.tar.gz
rust-d5e2a7aca55ed49fc943b7a07a8eba05ab5a0079.zip
Auto merge of #10539 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`
changelog: none
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/author/blocks.stdout6
-rw-r--r--tests/ui/boxed_local.rs35
-rw-r--r--tests/ui/boxed_local.stderr8
-rw-r--r--tests/ui/erasing_op.rs8
-rw-r--r--tests/ui/erasing_op.stderr10
-rw-r--r--tests/ui/integer_arithmetic.rs2
-rw-r--r--tests/ui/no_effect.rs3
-rw-r--r--tests/ui/no_effect.stderr38
-rw-r--r--tests/ui/overflow_check_conditional.rs9
-rw-r--r--tests/ui/overflow_check_conditional.stderr16
-rw-r--r--tests/ui/unnecessary_operation.fixed2
-rw-r--r--tests/ui/unnecessary_operation.rs2
-rw-r--r--tests/ui/unnecessary_operation.stderr46
13 files changed, 78 insertions, 107 deletions
diff --git a/tests/ui/author/blocks.stdout b/tests/ui/author/blocks.stdout
index c6acf24c21e..eb3e5189c82 100644
--- a/tests/ui/author/blocks.stdout
+++ b/tests/ui/author/blocks.stdout
@@ -43,11 +43,7 @@ if let ExprKind::Block(block, None) = expr.kind
 if let ExprKind::Closure(CaptureBy::Value, fn_decl, body_id, _, None) = expr.kind
     && let FnRetTy::DefaultReturn(_) = fn_decl.output
     && expr1 = &cx.tcx.hir().body(body_id).value
-    && let ExprKind::Call(func, args) = expr1.kind
-    && let ExprKind::Path(ref qpath) = func.kind
-    && matches!(qpath, QPath::LangItem(LangItem::IdentityFuture, _))
-    && args.len() == 1
-    && let ExprKind::Closure(CaptureBy::Value, fn_decl1, body_id1, _, Some(Movability::Static)) = args[0].kind
+    && let ExprKind::Closure(CaptureBy::Value, fn_decl1, body_id1, _, Some(Movability::Static)) = expr1.kind
     && let FnRetTy::DefaultReturn(_) = fn_decl1.output
     && expr2 = &cx.tcx.hir().body(body_id1).value
     && let ExprKind::Block(block, None) = expr2.kind
diff --git a/tests/ui/boxed_local.rs b/tests/ui/boxed_local.rs
index 4639f00a8d8..79b6d33fc77 100644
--- a/tests/ui/boxed_local.rs
+++ b/tests/ui/boxed_local.rs
@@ -1,4 +1,3 @@
-#![feature(box_syntax)]
 #![feature(lint_reasons)]
 #![allow(
     clippy::borrowed_box,
@@ -34,7 +33,7 @@ fn ok_box_trait(boxed_trait: &Box<dyn Z>) {
 }
 
 fn warn_call() {
-    let x = box A;
+    let x = Box::new(A);
     x.foo();
 }
 
@@ -43,41 +42,41 @@ fn warn_arg(x: Box<A>) {
 }
 
 fn nowarn_closure_arg() {
-    let x = Some(box A);
+    let x = Some(Box::new(A));
     x.map_or((), |x| take_ref(&x));
 }
 
 fn warn_rename_call() {
-    let x = box A;
+    let x = Box::new(A);
 
     let y = x;
     y.foo(); // via autoderef
 }
 
 fn warn_notuse() {
-    let bz = box A;
+    let bz = Box::new(A);
 }
 
 fn warn_pass() {
-    let bz = box A;
+    let bz = Box::new(A);
     take_ref(&bz); // via deref coercion
 }
 
 fn nowarn_return() -> Box<A> {
-    box A // moved out, "escapes"
+    Box::new(A) // moved out, "escapes"
 }
 
 fn nowarn_move() {
-    let bx = box A;
+    let bx = Box::new(A);
     drop(bx) // moved in, "escapes"
 }
 fn nowarn_call() {
-    let bx = box A;
+    let bx = Box::new(A);
     bx.clone(); // method only available to Box, not via autoderef
 }
 
 fn nowarn_pass() {
-    let bx = box A;
+    let bx = Box::new(A);
     take_box(&bx); // fn needs &Box
 }
 
@@ -86,30 +85,20 @@ fn take_ref(x: &A) {}
 
 fn nowarn_ref_take() {
     // false positive, should actually warn
-    let x = box A;
+    let x = Box::new(A);
     let y = &x;
     take_box(y);
 }
 
 fn nowarn_match() {
-    let x = box A; // moved into a match
+    let x = Box::new(A); // moved into a match
     match x {
         y => drop(y),
     }
 }
 
 fn warn_match() {
-    let x = box A;
-    match &x {
-        // not moved
-        y => (),
-    }
-}
-
-fn nowarn_large_array() {
-    // should not warn, is large array
-    // and should not be on stack
-    let x = box [1; 10000];
+    let x = Box::new(A);
     match &x {
         // not moved
         y => (),
diff --git a/tests/ui/boxed_local.stderr b/tests/ui/boxed_local.stderr
index 9036529f39c..10d78fbc0ab 100644
--- a/tests/ui/boxed_local.stderr
+++ b/tests/ui/boxed_local.stderr
@@ -1,5 +1,5 @@
 error: local variable doesn't need to be boxed here
-  --> $DIR/boxed_local.rs:41:13
+  --> $DIR/boxed_local.rs:40:13
    |
 LL | fn warn_arg(x: Box<A>) {
    |             ^
@@ -7,19 +7,19 @@ LL | fn warn_arg(x: Box<A>) {
    = note: `-D clippy::boxed-local` implied by `-D warnings`
 
 error: local variable doesn't need to be boxed here
-  --> $DIR/boxed_local.rs:132:12
+  --> $DIR/boxed_local.rs:121:12
    |
 LL | pub fn new(_needs_name: Box<PeekableSeekable<&()>>) -> () {}
    |            ^^^^^^^^^^^
 
 error: local variable doesn't need to be boxed here
-  --> $DIR/boxed_local.rs:196:44
+  --> $DIR/boxed_local.rs:185:44
    |
 LL |         fn default_impl_x(self: Box<Self>, x: Box<u32>) -> u32 {
    |                                            ^
 
 error: local variable doesn't need to be boxed here
-  --> $DIR/boxed_local.rs:203:16
+  --> $DIR/boxed_local.rs:192:16
    |
 LL |         fn foo(x: Box<u32>) {}
    |                ^
diff --git a/tests/ui/erasing_op.rs b/tests/ui/erasing_op.rs
index ae2fad0086d..74985029e00 100644
--- a/tests/ui/erasing_op.rs
+++ b/tests/ui/erasing_op.rs
@@ -31,9 +31,7 @@ impl core::ops::Mul<i32> for Vec1 {
 
 #[allow(clippy::no_effect)]
 #[warn(clippy::erasing_op)]
-fn main() {
-    let x: u8 = 0;
-
+fn test(x: u8) {
     x * 0;
     0 & x;
     0 / x;
@@ -41,3 +39,7 @@ fn main() {
     0 * Vec1 { x: 5 };
     Vec1 { x: 5 } * 0;
 }
+
+fn main() {
+    test(0)
+}
diff --git a/tests/ui/erasing_op.stderr b/tests/ui/erasing_op.stderr
index 165ed9bfe58..97941252355 100644
--- a/tests/ui/erasing_op.stderr
+++ b/tests/ui/erasing_op.stderr
@@ -1,5 +1,5 @@
 error: this operation will always return zero. This is likely not the intended outcome
-  --> $DIR/erasing_op.rs:37:5
+  --> $DIR/erasing_op.rs:35:5
    |
 LL |     x * 0;
    |     ^^^^^
@@ -7,25 +7,25 @@ LL |     x * 0;
    = note: `-D clippy::erasing-op` implied by `-D warnings`
 
 error: this operation will always return zero. This is likely not the intended outcome
-  --> $DIR/erasing_op.rs:38:5
+  --> $DIR/erasing_op.rs:36:5
    |
 LL |     0 & x;
    |     ^^^^^
 
 error: this operation will always return zero. This is likely not the intended outcome
-  --> $DIR/erasing_op.rs:39:5
+  --> $DIR/erasing_op.rs:37:5
    |
 LL |     0 / x;
    |     ^^^^^
 
 error: this operation will always return zero. This is likely not the intended outcome
-  --> $DIR/erasing_op.rs:41:5
+  --> $DIR/erasing_op.rs:39:5
    |
 LL |     0 * Vec1 { x: 5 };
    |     ^^^^^^^^^^^^^^^^^
 
 error: this operation will always return zero. This is likely not the intended outcome
-  --> $DIR/erasing_op.rs:42:5
+  --> $DIR/erasing_op.rs:40:5
    |
 LL |     Vec1 { x: 5 } * 0;
    |     ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/integer_arithmetic.rs b/tests/ui/integer_arithmetic.rs
index 67f24b4548a..8dfdee662b9 100644
--- a/tests/ui/integer_arithmetic.rs
+++ b/tests/ui/integer_arithmetic.rs
@@ -4,7 +4,7 @@
 #[rustfmt::skip]
 fn main() {
     let mut i = 1i32;
-    let mut var1 = 0i32;
+    let mut var1 = 13i32;
     let mut var2 = -1i32;
     1 + i;
     i * 2;
diff --git a/tests/ui/no_effect.rs b/tests/ui/no_effect.rs
index ac8b1e756f2..1e42e1fbabf 100644
--- a/tests/ui/no_effect.rs
+++ b/tests/ui/no_effect.rs
@@ -1,4 +1,4 @@
-#![feature(box_syntax, fn_traits, unboxed_closures)]
+#![feature(fn_traits, unboxed_closures)]
 #![warn(clippy::no_effect_underscore_binding)]
 #![allow(dead_code, path_statements)]
 #![allow(
@@ -107,7 +107,6 @@ fn main() {
     *&42;
     &6;
     (5, 6, 7);
-    box 42;
     ..;
     5..;
     ..5;
diff --git a/tests/ui/no_effect.stderr b/tests/ui/no_effect.stderr
index 2efefd2b2a3..f10f2bcf2a8 100644
--- a/tests/ui/no_effect.stderr
+++ b/tests/ui/no_effect.stderr
@@ -81,83 +81,77 @@ LL |     (5, 6, 7);
 error: statement with no effect
   --> $DIR/no_effect.rs:110:5
    |
-LL |     box 42;
-   |     ^^^^^^^
-
-error: statement with no effect
-  --> $DIR/no_effect.rs:111:5
-   |
 LL |     ..;
    |     ^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:112:5
+  --> $DIR/no_effect.rs:111:5
    |
 LL |     5..;
    |     ^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:113:5
+  --> $DIR/no_effect.rs:112:5
    |
 LL |     ..5;
    |     ^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:114:5
+  --> $DIR/no_effect.rs:113:5
    |
 LL |     5..6;
    |     ^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:115:5
+  --> $DIR/no_effect.rs:114:5
    |
 LL |     5..=6;
    |     ^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:116:5
+  --> $DIR/no_effect.rs:115:5
    |
 LL |     [42, 55];
    |     ^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:117:5
+  --> $DIR/no_effect.rs:116:5
    |
 LL |     [42, 55][1];
    |     ^^^^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:118:5
+  --> $DIR/no_effect.rs:117:5
    |
 LL |     (42, 55).1;
    |     ^^^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:119:5
+  --> $DIR/no_effect.rs:118:5
    |
 LL |     [42; 55];
    |     ^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:120:5
+  --> $DIR/no_effect.rs:119:5
    |
 LL |     [42; 55][13];
    |     ^^^^^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:122:5
+  --> $DIR/no_effect.rs:121:5
    |
 LL |     || x += 5;
    |     ^^^^^^^^^^
 
 error: statement with no effect
-  --> $DIR/no_effect.rs:124:5
+  --> $DIR/no_effect.rs:123:5
    |
 LL |     FooString { s: s };
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: binding to `_` prefixed variable with no side-effect
-  --> $DIR/no_effect.rs:125:5
+  --> $DIR/no_effect.rs:124:5
    |
 LL |     let _unused = 1;
    |     ^^^^^^^^^^^^^^^^
@@ -165,22 +159,22 @@ LL |     let _unused = 1;
    = note: `-D clippy::no-effect-underscore-binding` implied by `-D warnings`
 
 error: binding to `_` prefixed variable with no side-effect
-  --> $DIR/no_effect.rs:126:5
+  --> $DIR/no_effect.rs:125:5
    |
 LL |     let _penguin = || println!("Some helpful closure");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: binding to `_` prefixed variable with no side-effect
-  --> $DIR/no_effect.rs:127:5
+  --> $DIR/no_effect.rs:126:5
    |
 LL |     let _duck = Struct { field: 0 };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: binding to `_` prefixed variable with no side-effect
-  --> $DIR/no_effect.rs:128:5
+  --> $DIR/no_effect.rs:127:5
    |
 LL |     let _cat = [2, 4, 6, 8][2];
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 30 previous errors
+error: aborting due to 29 previous errors
 
diff --git a/tests/ui/overflow_check_conditional.rs b/tests/ui/overflow_check_conditional.rs
index 5db75f5291b..e1e30114081 100644
--- a/tests/ui/overflow_check_conditional.rs
+++ b/tests/ui/overflow_check_conditional.rs
@@ -1,9 +1,6 @@
 #![warn(clippy::overflow_check_conditional)]
 
-fn main() {
-    let a: u32 = 1;
-    let b: u32 = 2;
-    let c: u32 = 3;
+fn test(a: u32, b: u32, c: u32) {
     if a + b < a {}
     if a > a + b {}
     if a + b < b {}
@@ -23,3 +20,7 @@ fn main() {
     if i > i + j {}
     if i - j < i {}
 }
+
+fn main() {
+    test(1, 2, 3)
+}
diff --git a/tests/ui/overflow_check_conditional.stderr b/tests/ui/overflow_check_conditional.stderr
index 1b8b146b60a..92d1d8ef911 100644
--- a/tests/ui/overflow_check_conditional.stderr
+++ b/tests/ui/overflow_check_conditional.stderr
@@ -1,5 +1,5 @@
 error: you are trying to use classic C overflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:7:8
+  --> $DIR/overflow_check_conditional.rs:4:8
    |
 LL |     if a + b < a {}
    |        ^^^^^^^^^
@@ -7,43 +7,43 @@ LL |     if a + b < a {}
    = note: `-D clippy::overflow-check-conditional` implied by `-D warnings`
 
 error: you are trying to use classic C overflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:8:8
+  --> $DIR/overflow_check_conditional.rs:5:8
    |
 LL |     if a > a + b {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C overflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:9:8
+  --> $DIR/overflow_check_conditional.rs:6:8
    |
 LL |     if a + b < b {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C overflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:10:8
+  --> $DIR/overflow_check_conditional.rs:7:8
    |
 LL |     if b > a + b {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C underflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:11:8
+  --> $DIR/overflow_check_conditional.rs:8:8
    |
 LL |     if a - b > b {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C underflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:12:8
+  --> $DIR/overflow_check_conditional.rs:9:8
    |
 LL |     if b < a - b {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C underflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:13:8
+  --> $DIR/overflow_check_conditional.rs:10:8
    |
 LL |     if a - b > a {}
    |        ^^^^^^^^^
 
 error: you are trying to use classic C underflow conditions that will fail in Rust
-  --> $DIR/overflow_check_conditional.rs:14:8
+  --> $DIR/overflow_check_conditional.rs:11:8
    |
 LL |     if a < a - b {}
    |        ^^^^^^^^^
diff --git a/tests/ui/unnecessary_operation.fixed b/tests/ui/unnecessary_operation.fixed
index ec931c726ee..b046694f8c6 100644
--- a/tests/ui/unnecessary_operation.fixed
+++ b/tests/ui/unnecessary_operation.fixed
@@ -1,6 +1,5 @@
 // run-rustfix
 
-#![feature(box_syntax)]
 #![allow(
     clippy::deref_addrof,
     dead_code,
@@ -65,7 +64,6 @@ fn main() {
     5;6;get_number();
     get_number();
     get_number();
-    get_number();
     5;get_number();
     42;get_number();
     assert!([42, 55].len() > get_usize());
diff --git a/tests/ui/unnecessary_operation.rs b/tests/ui/unnecessary_operation.rs
index d896df32e41..9ed9679e938 100644
--- a/tests/ui/unnecessary_operation.rs
+++ b/tests/ui/unnecessary_operation.rs
@@ -1,6 +1,5 @@
 // run-rustfix
 
-#![feature(box_syntax)]
 #![allow(
     clippy::deref_addrof,
     dead_code,
@@ -63,7 +62,6 @@ fn main() {
     *&get_number();
     &get_number();
     (5, 6, get_number());
-    box get_number();
     get_number()..;
     ..get_number();
     5..get_number();
diff --git a/tests/ui/unnecessary_operation.stderr b/tests/ui/unnecessary_operation.stderr
index c183082ec86..a1d0d93998a 100644
--- a/tests/ui/unnecessary_operation.stderr
+++ b/tests/ui/unnecessary_operation.stderr
@@ -1,5 +1,5 @@
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:57:5
+  --> $DIR/unnecessary_operation.rs:56:5
    |
 LL |     Tuple(get_number());
    |     ^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
@@ -7,109 +7,103 @@ LL |     Tuple(get_number());
    = note: `-D clippy::unnecessary-operation` implied by `-D warnings`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:58:5
+  --> $DIR/unnecessary_operation.rs:57:5
    |
 LL |     Struct { field: get_number() };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:59:5
+  --> $DIR/unnecessary_operation.rs:58:5
    |
 LL |     Struct { ..get_struct() };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_struct();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:60:5
+  --> $DIR/unnecessary_operation.rs:59:5
    |
 LL |     Enum::Tuple(get_number());
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:61:5
+  --> $DIR/unnecessary_operation.rs:60:5
    |
 LL |     Enum::Struct { field: get_number() };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:62:5
+  --> $DIR/unnecessary_operation.rs:61:5
    |
 LL |     5 + get_number();
    |     ^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `5;get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:63:5
+  --> $DIR/unnecessary_operation.rs:62:5
    |
 LL |     *&get_number();
    |     ^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:64:5
+  --> $DIR/unnecessary_operation.rs:63:5
    |
 LL |     &get_number();
    |     ^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:65:5
+  --> $DIR/unnecessary_operation.rs:64:5
    |
 LL |     (5, 6, get_number());
    |     ^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `5;6;get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:66:5
-   |
-LL |     box get_number();
-   |     ^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
-
-error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:67:5
+  --> $DIR/unnecessary_operation.rs:65:5
    |
 LL |     get_number()..;
    |     ^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:68:5
+  --> $DIR/unnecessary_operation.rs:66:5
    |
 LL |     ..get_number();
    |     ^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:69:5
+  --> $DIR/unnecessary_operation.rs:67:5
    |
 LL |     5..get_number();
    |     ^^^^^^^^^^^^^^^^ help: statement can be reduced to: `5;get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:70:5
+  --> $DIR/unnecessary_operation.rs:68:5
    |
 LL |     [42, get_number()];
    |     ^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `42;get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:71:5
+  --> $DIR/unnecessary_operation.rs:69:5
    |
 LL |     [42, 55][get_usize()];
    |     ^^^^^^^^^^^^^^^^^^^^^^ help: statement can be written as: `assert!([42, 55].len() > get_usize());`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:72:5
+  --> $DIR/unnecessary_operation.rs:70:5
    |
 LL |     (42, get_number()).1;
    |     ^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `42;get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:73:5
+  --> $DIR/unnecessary_operation.rs:71:5
    |
 LL |     [get_number(); 55];
    |     ^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:74:5
+  --> $DIR/unnecessary_operation.rs:72:5
    |
 LL |     [42; 55][get_usize()];
    |     ^^^^^^^^^^^^^^^^^^^^^^ help: statement can be written as: `assert!([42; 55].len() > get_usize());`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:75:5
+  --> $DIR/unnecessary_operation.rs:73:5
    |
 LL | /     {
 LL | |         get_number()
@@ -117,12 +111,12 @@ LL | |     };
    | |______^ help: statement can be reduced to: `get_number();`
 
 error: unnecessary operation
-  --> $DIR/unnecessary_operation.rs:78:5
+  --> $DIR/unnecessary_operation.rs:76:5
    |
 LL | /     FooString {
 LL | |         s: String::from("blah"),
 LL | |     };
    | |______^ help: statement can be reduced to: `String::from("blah");`
 
-error: aborting due to 20 previous errors
+error: aborting due to 19 previous errors