rust/src
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
..
bootstrap Rollup merge of #87513 - hudson-ayers:bootstrap-py-fix, r=jyn514 2021-07-28 18:28:21 +09:00
build_helper Revert "Revert "Move llvm submodule updates to rustbuild"" 2021-06-04 22:17:01 -04:00
ci add CI_ONLY_WHEN_CHANNEL and run x86_64-gnu-stable only on nightly 2021-07-28 15:32:23 +02:00
doc Rollup merge of #87315 - ricobbe:raw-dylib-unstable-book, r=wesleywiser 2021-07-28 18:28:13 +09:00
etc Auto merge of #85305 - MarcusDunn:master, r=pnkfelix 2021-07-27 05:53:31 +00:00
librustdoc Auto merge of #87285 - GuillaumeGomez:intra-doc-span, r=estebank 2021-07-29 23:33:18 +00:00
llvm-project@bdb386270f Update to LLVM 12.0.1 2021-07-12 08:53:53 +02:00
rustdoc-json-types Add generic arg infer 2021-07-25 07:28:51 +00:00
test Auto merge of #85971 - FabianWolff:issue-85586, r=davidtwco 2021-07-30 14:38:00 +00:00
tools Merge commit '0cce3f643b' into clippyup 2021-07-29 12:16:06 +02:00
README.md
stage0.txt Update to new bootstrap compiler 2021-06-28 11:30:49 -04:00
version Bump to 1.56 2021-07-23 17:04:59 -04:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.