summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-106991.rs
blob: e4d7f765b4a8a0ec704be2e83825bcaf45831e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn foo(items: &mut Vec<u8>) {
    items.sort();
}

fn bar() -> impl Iterator<Item = i32> {
    //~^ ERROR expected `foo` to be a fn item that returns `i32`, but it returns `()` [E0271]
    let mut x: Vec<Vec<u8>> = vec![vec![0, 2, 1], vec![5, 4, 3]];
    x.iter_mut().map(foo)
}

fn main() {
    bar();
}