diff options
author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-01-06 11:38:56 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 11:38:56 +0530 |
commit | 6ae0f08c193d67bfe6336796e0c54da35d330504 (patch) | |
tree | 10c69cec34df6ee08f107fd45c71d1f3d17d3908 /tests/rustdoc-js-std/parser-errors.js | |
parent | 0853d9677ca903cd650d5c4b93b1c55e7995cf01 (diff) | |
parent | f98f2fcb5e4985bd7b12bae4ec03f2d96197fb2b (diff) | |
download | rust-6ae0f08c193d67bfe6336796e0c54da35d330504.tar.gz |
Rollup merge of #106400 - estebank:type-errs, r=compiler-errors
Point at expressions where inference refines an unexpected type
Fix #106355. Fix #14007. (!)
```
error[E0308]: mismatched types
--> src/test/ui/type/type-check/point-at-inference.rs:12:9
|
9 | foo.push(i);
| - this is of type `&{integer}`, which makes `foo` to be inferred as `Vec<&{integer}>`
...
12 | bar(foo);
| --- ^^^ expected `i32`, found `&{integer}`
| |
| arguments to this function are incorrect
|
= note: expected struct `Vec<i32>`
found struct `Vec<&{integer}>`
note: function defined here
--> src/test/ui/type/type-check/point-at-inference.rs:2:4
|
2 | fn bar(_: Vec<i32>) {}
| ^^^ -----------
help: consider dereferencing the borrow
|
9 | foo.push(*i);
| +
```
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions