rust/src
Esteban Küber 69fb612608 Keep track of parse errors in mods and don't emit resolve errors for paths involving them
When we expand a `mod foo;` and parse `foo.rs`, we now track whether that file had an unrecovered parse error that reached the end of the file. If so, we keep that information around. When resolving a path like `foo::bar`, we do not emit any errors for "`bar` not found in `foo`", as we know that the parse error might have caused `bar` to not be parsed and accounted for.

When this happens in an existing project, every path referencing `foo` would be an irrelevant compile error. Instead, we now skip emitting anything until `foo.rs` is fixed. Tellingly enough, we didn't have any test for errors caused by `mod` expansion.

Fix #97734.
2024-12-10 18:17:24 +00:00
..
bootstrap Auto merge of #134125 - fmease:rollup-u38o3ob, r=fmease 2024-12-10 13:16:09 +00:00
build_helper move src/tools/build_helper into src/build_helper 2024-11-11 11:19:11 +03:00
ci Auto merge of #133902 - Kobzol:ci-dist-arm-runner, r=MarcoIeni 2024-12-10 07:44:46 +00:00
doc Rollup merge of #133930 - chriskrycho:mdbook-trpl-package, r=ehuss 2024-12-06 09:27:40 +01:00
etc Auto merge of #133134 - Walnut356:synth_prov, r=Mark-Simulacrum 2024-12-08 19:30:33 +00:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Rollup merge of #133567 - bjorn3:various_cleanups, r=cjgillot 2024-12-09 01:56:32 +01:00
llvm-project@1268e87bdb Update LLVM to 19.1.5 2024-12-03 21:12:47 +08:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc-json: Include safety of statics 2024-12-01 21:39:58 +00:00
tools Keep track of parse errors in mods and don't emit resolve errors for paths involving them 2024-12-10 18:17:24 +00:00
README.md
stage0 bump stage0 2024-11-27 12:12:23 +00:00
version Bump to 1.85 2024-11-22 11:08:33 +00:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

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