Matthias Krüger c1810269e9
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.
2024-12-13 17:25:28 +01:00
..
2024-12-08 15:32:04 +08:00
2024-10-28 14:20:28 +11:00
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01:00
2024-10-30 16:47:47 -07:00
2024-12-10 11:34:13 +08:00
2024-11-29 06:10:15 +11:00
2024-11-16 20:03:31 +00:00
2024-10-11 11:30:08 -04:00
2024-11-29 06:10:15 +11:00
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01:00