]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/redundant_closure_call.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / redundant_closure_call.rs
1
2
3
4 #![warn(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 }