about summary refs log tree commit diff
path: root/tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-13 17:25:28 +0100
committerGitHub <noreply@github.com>2024-12-13 17:25:28 +0100
commite2a0e387a41547bb08f74e984fa707a9bbf7fbc4 (patch)
tree39df80b8da4e4481971d8d9848c36358d93e4262 /tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
parent51ff9843146313daf676158d0e765a86e58637f8 (diff)
parenta8d2960935d86596ba8c5ad0f2aa445f7e0eb6b0 (diff)
downloadrust-e2a0e387a41547bb08f74e984fa707a9bbf7fbc4.tar.gz
rust-e2a0e387a41547bb08f74e984fa707a9bbf7fbc4.zip
Rollup merge of #133937 - estebank:silence-resolve-errors-from-mod-with-parse-errors, r=davidtwco
Keep track of parse errors in `mod`s 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 in the HIR and mark its `DefId` in the `Resolver`. 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 expansion of `mod`s with parse errors.

Fix https://github.com/rust-lang/rust/issues/97734.
Diffstat (limited to 'tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions