summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-35668.rs
blob: c970163fcab2c65281b2f4bfbff92c28b87b1260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn func<'a, T>(a: &'a [T]) -> impl Iterator<Item=&'a T> {
    a.iter().map(|a| a*a)
    //~^ ERROR cannot multiply `&T` by `&T`
}

fn main() {
    let a = (0..30).collect::<Vec<_>>();

    for k in func(&a) {
        println!("{}", k);
    }
}