summaryrefslogtreecommitdiffstats
path: root/tests/ui/type/type-check/point-at-inference.fixed
blob: f41fbe59fba6c26b67786c9791f1bebc0d930273 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-rustfix
fn bar(_: Vec<i32>) {}
fn baz(_: &impl std::any::Any) {}
fn main() {
    let v = vec![1, 2, 3, 4, 5];
    let mut foo = vec![];
    baz(&foo);
    for i in &v {
        foo.push(*i);
    }
    baz(&foo);
    bar(foo); //~ ERROR E0308
}