]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-check/point-at-inference.stderr
Rollup merge of #106499 - lyming2007:issue-105946-fix, r=estebank
[rust.git] / src / test / ui / type / type-check / point-at-inference.stderr
1 error[E0308]: mismatched types
2   --> $DIR/point-at-inference.rs:12:9
3    |
4 LL |         foo.push(i);
5    |                  - this is of type `&{integer}`, which causes `foo` to be inferred as `Vec<&{integer}>`
6 ...
7 LL |     bar(foo);
8    |     --- ^^^ expected `i32`, found `&{integer}`
9    |     |
10    |     arguments to this function are incorrect
11    |
12    = note: expected struct `Vec<i32>`
13               found struct `Vec<&{integer}>`
14 note: function defined here
15   --> $DIR/point-at-inference.rs:2:4
16    |
17 LL | fn bar(_: Vec<i32>) {}
18    |    ^^^ -----------
19 help: consider dereferencing the borrow
20    |
21 LL |         foo.push(*i);
22    |                  +
23
24 error: aborting due to previous error
25
26 For more information about this error, try `rustc --explain E0308`.