rust/src
Jubilee 3d4467dfcc
Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov
Fix ICE with buffered lint referring to AST node deleted by everybody_loops

Fixes #87308. Note the following comment:
08759c691e/compiler/rustc_lint/src/early.rs (L415-L417)

As it turns out, this is not _always_ a bug, because `-Zunpretty=everybody_loops` causes a lot of AST nodes to be deleted, and thus some buffered lints will refer to non-existent node ids. To fix this, my changes simply ignore buffered lints if `-Zunpretty=everybody_loops` is enabled, which, from my understanding, shouldn't be a big issue because it only affects pretty-printing. Of course, a more elegant solution would only ignore buffered lints that actually point at deleted node ids, but I haven't figured out an easy way of achieving this.

For the concrete example in #87308, the buffered lint is created [here](08759c691e/compiler/rustc_expand/src/mbe/macro_rules.rs (L145-L151)) with the `lint_node_id` from [here](08759c691e/compiler/rustc_expand/src/mbe/macro_rules.rs (L319)), i.e. it points at the macro _expansion_, which then gets deleted by `ReplaceBodyWithLoop` [here](08759c691e/compiler/rustc_interface/src/passes.rs (L377)).
2021-10-04 13:58:16 -07:00
..
bootstrap bootstrap: Update comment (again) in config.library.toml 2021-09-30 11:25:20 -05:00
build_helper Migrate to 2021 2021-09-20 22:21:42 -04:00
ci Update Let's Encrypt ROOT CA certificate in dist-(i686|x86_64)-linux docker images 2021-10-03 10:58:37 +02:00
doc Fix typos in rustdoc/lints 2021-10-02 19:03:32 +02:00
etc Migrate to 2021 2021-09-20 22:21:42 -04:00
librustdoc Rollup merge of #89444 - notriddle:notriddle/contains-str, r=jyn514 2021-10-04 13:58:12 -07:00
llvm-project@522c3e3d9c Update llvm submodule to fix function name mangling on x86 Windows 2021-09-30 10:03:12 -04:00
rustdoc-json-types Migrate to 2021 2021-09-20 22:21:42 -04:00
test Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov 2021-10-04 13:58:16 -07:00
tools Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearth 2021-10-03 21:44:10 +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.