11error: try not to call a closure in the expression where it is declared
2- --> $DIR/redundant_closure_call_fixable.rs:16 :13
2+ --> $DIR/redundant_closure_call_fixable.rs:17 :13
33 |
44LL | let a = (|| 42)();
55 | ^^^^^^^^^ help: try doing something like: `42`
@@ -8,7 +8,7 @@ LL | let a = (|| 42)();
88 = help: to override `-D warnings` add `#[allow(clippy::redundant_closure_call)]`
99
1010error: try not to call a closure in the expression where it is declared
11- --> $DIR/redundant_closure_call_fixable.rs:17 :13
11+ --> $DIR/redundant_closure_call_fixable.rs:18 :13
1212 |
1313LL | let b = (async || {
1414 | _____________^
@@ -28,7 +28,7 @@ LL ~ };
2828 |
2929
3030error: try not to call a closure in the expression where it is declared
31- --> $DIR/redundant_closure_call_fixable.rs:22 :13
31+ --> $DIR/redundant_closure_call_fixable.rs:23 :13
3232 |
3333LL | let c = (|| {
3434 | _____________^
@@ -48,13 +48,13 @@ LL ~ };
4848 |
4949
5050error: try not to call a closure in the expression where it is declared
51- --> $DIR/redundant_closure_call_fixable.rs:27 :13
51+ --> $DIR/redundant_closure_call_fixable.rs:28 :13
5252 |
5353LL | let d = (async || something().await)();
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async { something().await }`
5555
5656error: try not to call a closure in the expression where it is declared
57- --> $DIR/redundant_closure_call_fixable.rs:36 :13
57+ --> $DIR/redundant_closure_call_fixable.rs:37 :13
5858 |
5959LL | (|| m!())()
6060 | ^^^^^^^^^^^ help: try doing something like: `m!()`
@@ -65,7 +65,7 @@ LL | m2!();
6565 = note: this error originates in the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)
6666
6767error: try not to call a closure in the expression where it is declared
68- --> $DIR/redundant_closure_call_fixable.rs:31 :13
68+ --> $DIR/redundant_closure_call_fixable.rs:32 :13
6969 |
7070LL | (|| 0)()
7171 | ^^^^^^^^ help: try doing something like: `0`
@@ -76,61 +76,61 @@ LL | m2!();
7676 = note: this error originates in the macro `m` which comes from the expansion of the macro `m2` (in Nightly builds, run with -Z macro-backtrace for more info)
7777
7878error: try not to call a closure in the expression where it is declared
79- --> $DIR/redundant_closure_call_fixable.rs:44 :16
79+ --> $DIR/redundant_closure_call_fixable.rs:45 :16
8080 |
8181LL | assert_eq!((|| || 43)()(), 42);
8282 | ^^^^^^^^^^^^^^ help: try doing something like: `43`
8383
8484error: try not to call a closure in the expression where it is declared
85- --> $DIR/redundant_closure_call_fixable.rs:53 :10
85+ --> $DIR/redundant_closure_call_fixable.rs:54 :10
8686 |
8787LL | dbg!((|| 42)());
8888 | ^^^^^^^^^ help: try doing something like: `42`
8989
9090error: try not to call a closure in the expression where it is declared
91- --> $DIR/redundant_closure_call_fixable.rs:56 :13
91+ --> $DIR/redundant_closure_call_fixable.rs:57 :13
9292 |
9393LL | let a = (|| || || 123)();
9494 | ^^^^^^^^^^^^^^^^ help: try doing something like: `(|| || 123)`
9595
9696error: try not to call a closure in the expression where it is declared
97- --> $DIR/redundant_closure_call_fixable.rs:60 :13
97+ --> $DIR/redundant_closure_call_fixable.rs:61 :13
9898 |
9999LL | let a = (|| || || || async || 1)()()()()();
100100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `async { 1 }`
101101
102102error: try not to call a closure in the expression where it is declared
103- --> $DIR/redundant_closure_call_fixable.rs:69 :13
103+ --> $DIR/redundant_closure_call_fixable.rs:70 :13
104104 |
105105LL | let a = (|| echo!(|| echo!(|| 1)))()()();
106106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `1`
107107
108108error: try not to call a closure in the expression where it is declared
109- --> $DIR/redundant_closure_call_fixable.rs:71 :13
109+ --> $DIR/redundant_closure_call_fixable.rs:72 :13
110110 |
111111LL | let a = (|| echo!((|| 123)))()();
112112 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `123`
113113
114114error: try not to call a closure in the expression where it is declared
115- --> $DIR/redundant_closure_call_fixable.rs:84 :11
115+ --> $DIR/redundant_closure_call_fixable.rs:85 :11
116116 |
117117LL | bar()((|| || 42)()(), 5);
118118 | ^^^^^^^^^^^^^^ help: try doing something like: `42`
119119
120120error: try not to call a closure in the expression where it is declared
121- --> $DIR/redundant_closure_call_fixable.rs:85 :9
121+ --> $DIR/redundant_closure_call_fixable.rs:86 :9
122122 |
123123LL | foo((|| || 42)()(), 5);
124124 | ^^^^^^^^^^^^^^ help: try doing something like: `42`
125125
126126error: try not to call a closure in the expression where it is declared
127- --> $DIR/redundant_closure_call_fixable.rs:89 :5
127+ --> $DIR/redundant_closure_call_fixable.rs:90 :5
128128 |
129129LL | (|| async {})().await;
130130 | ^^^^^^^^^^^^^^^ help: try doing something like: `(async {})`
131131
132132error: try not to call a closure in the expression where it is declared
133- --> $DIR/redundant_closure_call_fixable.rs:98 :18
133+ --> $DIR/redundant_closure_call_fixable.rs:99 :18
134134 |
135135LL | spawn_on((|| async move {})());
136136 | ^^^^^^^^^^^^^^^^^^^^ help: try doing something like: `(async move {})`
0 commit comments