rust/src
bors e7958d35ca Auto merge of #87830 - hkmatsumoto:suggest-brackets-for-array-esque-block-expr, r=estebank
Suggest replacing braces for brackets on array-esque invalid block expr

Newcomers may write `{1, 2, 3}` for making arrays, and the current error message is not informative enough to quickly convince them what is needed to fix the error.

This PR implements a diagnostic for this case, and its output looks like this:
```text
error: this code is interpreted as a block expression, not an array
 --> src/lib.rs:1:22
  |
1 |   const FOO: [u8; 3] = {
  |  ______________________^
2 | |     1, 2, 3
3 | | };
  | |_^
  |
  = note: to define an array, one would use square brackets instead of curly braces
help: try using [] instead of {}
  |
1 | const FOO: [u8; 3] = [
2 |     1, 2, 3
3 | ];
  |
```

Fix #87672
2021-09-21 00:34:10 +00:00
..
bootstrap Auto merge of #88321 - glaubitz:m68k-linux, r=wesleywiser 2021-09-20 07:21:05 +00:00
build_helper rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
ci ci: Add Dockerfile for dist-m68k-linux 2021-09-17 15:07:13 +00:00
doc doc/platform-support: Add documentation for m68k-unknown-linux-gnu 2021-09-17 15:07:14 +00:00
etc set the executable bit on pre-commit.sh 2021-08-11 15:06:33 -04:00
librustdoc Auto merge of #88321 - glaubitz:m68k-linux, r=wesleywiser 2021-09-20 07:21:05 +00:00
llvm-project@86c7daa627 Update LLVM submodule 2021-09-11 00:15:38 +02:00
rustdoc-json-types rustdoc: Clean up handling of lifetime bounds 2021-09-02 14:27:59 -07:00
test Auto merge of #87830 - hkmatsumoto:suggest-brackets-for-array-esque-block-expr, r=estebank 2021-09-21 00:34:10 +00:00
tools Auto merge of #88321 - glaubitz:m68k-linux, r=wesleywiser 2021-09-20 07:21:05 +00:00
README.md
stage0.json Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
version Bump version to 1.57 2021-09-03 21:54:48 -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.