]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_closure_call.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / redundant_closure_call.rs
1 #![feature(tool_lints)]
2
3
4 #![warn(clippy::redundant_closure_call)]
5
6 fn main() {
7         let a = (|| 42)();
8
9         let mut i = 1;
10         let mut k = (|m| m+1)(i);
11
12         k = (|a,b| a*b)(1,5);
13
14         let closure = || 32;
15         i = closure();
16
17         let closure = |i| i+1;
18         i = closure(3);
19
20         i = closure(4);
21 }