]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check/point-at-inference.fixed
Rollup merge of #106499 - lyming2007:issue-105946-fix, r=estebank
[rust.git] / src / test / ui / type / type-check / point-at-inference.fixed
1 // run-rustfix
2 fn bar(_: Vec<i32>) {}
3 fn baz(_: &impl std::any::Any) {}
4 fn main() {
5     let v = vec![1, 2, 3, 4, 5];
6     let mut foo = vec![];
7     baz(&foo);
8     for i in &v {
9         foo.push(*i);
10     }
11     baz(&foo);
12     bar(foo); //~ ERROR E0308
13 }