2017-02-07 20:05:30 +00:00
|
|
|
error: Closure called just once immediately after it was declared
|
2017-05-11 14:36:28 +00:00
|
|
|
--> $DIR/redundant_closure_call.rs:15:2
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-11 14:36:28 +00:00
|
|
|
15 | \ti = closure();
|
2017-02-07 20:05:30 +00:00
|
|
|
| \t^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/redundant_closure_call.rs:4:9
|
|
|
|
|
|
|
|
|
4 | #![deny(redundant_closure_call)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: Closure called just once immediately after it was declared
|
2017-05-11 14:36:28 +00:00
|
|
|
--> $DIR/redundant_closure_call.rs:18:2
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-11 14:36:28 +00:00
|
|
|
18 | \ti = closure(3);
|
2017-02-07 20:05:30 +00:00
|
|
|
| \t^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
|
|
|
--> $DIR/redundant_closure_call.rs:7:10
|
|
|
|
|
|
|
|
|
7 | \tlet a = (|| 42)();
|
2017-05-03 10:51:47 +00:00
|
|
|
| \t ^^^^^^^^^ help: Try doing something like: `42`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2017-05-11 14:36:28 +00:00
|
|
|
--> $DIR/redundant_closure_call.rs:10:10
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-11 14:36:28 +00:00
|
|
|
10 | \tlet k = (|m| m+1)(i);
|
2017-02-07 20:05:30 +00:00
|
|
|
| \t ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2017-05-11 14:36:28 +00:00
|
|
|
--> $DIR/redundant_closure_call.rs:12:6
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2017-05-11 14:36:28 +00:00
|
|
|
12 | \tk = (|a,b| a*b)(1,5);
|
2017-02-07 20:05:30 +00:00
|
|
|
| \t ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|