]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check/point-at-inference-3.fixed
Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk
[rust.git] / src / test / ui / type / type-check / point-at-inference-3.fixed
1 // run-rustfix
2 fn main() {
3     let mut v = Vec::new();
4     v.push(0i32);
5     //~^ NOTE this is of type `i32`, which causes `v` to be inferred as `Vec<i32>`
6     v.push(0);
7     v.push(1i32); //~ ERROR mismatched types
8     //~^ NOTE expected `i32`, found `u32`
9     //~| NOTE arguments to this method are incorrect
10     //~| NOTE associated function defined here
11     //~| HELP change the type of the numeric literal from `u32` to `i32`
12 }