rust/src/test
bors f3f8e758f2 Auto merge of #85971 - FabianWolff:issue-85586, r=davidtwco
Use more precise span for E0282 in cast expressions

This pull request fixes #85586. The example code given there:
```rust
fn main() {
    let a = [1, 2, 3].iter().sum();
    let b = (a + 1) as usize;
}
```
currently produces
```
error[E0282]: type annotations needed
 --> issue-85586.rs:3:13
  |
3 |     let b = (a + 1) as usize;
  |             ^^^^^^^^^^^^^^^^ cannot infer type
  |
  = note: type must be known at this point

error: aborting due to previous error
```
even though the type of the entire cast expression quite clearly should be `usize`. The error is in the cast's left-hand side, which is made explicit by the changes in this PR:
```
error[E0282]: type annotations needed
 --> issue-85586.rs:3:13
  |
3 |     let b = (a + 1) as usize;
  |             ^^^^^^^ cannot infer type
  |
  = note: type must be known at this point

error: aborting due to previous error
```
2021-07-30 14:38:00 +00:00
..
assembly Re-Annotate the tests with needs-llvm-components 2021-06-24 23:13:08 +03:00
auxiliary
codegen Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
codegen-units
debuginfo Fix failing test 2021-07-25 20:34:08 +02:00
incremental Make type_implements_trait not a query 2021-07-06 14:38:10 -04:00
mir-opt Update tests 2021-07-27 16:26:50 -04:00
pretty Auto merge of #83491 - jyn514:remove-pretty, r=pnkfelix 2021-07-27 03:12:40 +00:00
run-make Rename force-warns to force-warn 2021-07-21 15:41:10 +02:00
run-make-fulldeps Auto merge of #83491 - jyn514:remove-pretty, r=pnkfelix 2021-07-27 03:12:40 +00:00
run-pass-valgrind
rustdoc Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514 2021-07-29 06:11:45 +09:00
rustdoc-gui Auto merge of #87390 - notriddle:notriddle/rustdoc-headers-patch, r=GuillaumeGomez 2021-07-25 21:41:57 +00:00
rustdoc-js fix(rustdoc): generics search 2021-07-01 06:40:27 -07:00
rustdoc-js-std fix(rustdoc): generics search 2021-07-01 06:40:27 -07:00
rustdoc-json
rustdoc-ui Auto merge of #87285 - GuillaumeGomez:intra-doc-span, r=estebank 2021-07-29 23:33:18 +00:00
rustfix
ui Auto merge of #85971 - FabianWolff:issue-85586, r=davidtwco 2021-07-30 14:38:00 +00:00
ui-fulldeps Add long explanation for E0498 2021-07-27 18:06:34 +01:00
COMPILER_TESTS.md