lint based on closure pipe span

This commit is contained in:
csmoe 2018-11-15 16:35:23 +08:00
parent 4ec0ba9545
commit 052bdff8fb
2 changed files with 17 additions and 1 deletions

View file

@ -22,6 +22,8 @@ fn main() {
//~^ ERROR closure is expected to take
f(|| panic!());
//~^ ERROR closure is expected to take
f(move || panic!());
//~^ ERROR closure is expected to take
let _it = vec![1, 2, 3].into_iter().enumerate().map(|i, x| i);
//~^ ERROR closure is expected to take