about summary refs log tree commit diff
path: root/src/test/ui/suggestions/for-i-in-vec.fixed
blob: ec7358bd08ad23b20de8c59055324fa67a3c70c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-rustfix
#![allow(dead_code)]

struct Foo {
    v: Vec<u32>,
}

impl Foo {
    fn bar(&self) {
        for _ in &self.v { //~ ERROR cannot move out of `self.v` which is behind a shared reference
        }
    }
}

fn main() {}