rust/compiler/rustc_middle/src
Matthias Krüger 84114fea9e
Rollup merge of #120707 - compiler-errors:suitable-region, r=nnethercote
Don't expect early-bound region to be local when reporting errors in RPITIT well-formedness

The implicit lifetime in the example code gets replaced with `ReError`, which fails a `sub_regions` check in the lexical region solver. Error reporting ends up calling `is_suitable_region` on an early bound region in the *trait* definition. This causes an ICE because we `expect_local()`.

This is kind of a bad explanation, but this code just makes diagnostics reporting a bit more gracefully fallible. If the reviewer wants a thorough investigation of exactly where we get this region outlives obligation, I can write one up. Doesn't really seem worth it, though, imo.

Fixes #120638
Fixes #120648
2024-02-06 22:45:43 +01:00
..
dep_graph Reduce exposure of things. 2023-11-16 16:49:22 +11:00
hir hir: Remove the generic type parameter from MaybeOwned 2024-02-03 15:50:14 +03:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer cleanup effect var handling 2024-02-05 10:51:18 +01:00
middle Rollup merge of #120502 - clubby789:remove-ffi-returns-twice, r=compiler-errors 2024-02-06 22:45:42 +01:00
mir Rollup merge of #120423 - RalfJung:indirect-structural-match, r=petrochenkov 2024-02-06 22:45:41 +01:00
query Bless tests, add comments 2024-02-06 02:22:58 +00:00
thir Remove thir::Guard 2024-01-05 10:56:59 +00:00
traits Bless tests, add comments 2024-02-06 02:22:58 +00:00
ty Rollup merge of #120707 - compiler-errors:suitable-region, r=nnethercote 2024-02-06 22:45:43 +01:00
util compiler: Lower fn call arg spans down to MIR 2024-01-15 19:07:11 +01:00
arena.rs Rollup merge of #119600 - aDotInTheVoid:comment-fix, r=compiler-errors 2024-02-05 06:37:14 +01:00
error.rs Use DiagnosticArgName in a few more places. 2024-02-03 09:02:50 +11:00
lib.rs Remove unused features 2024-01-25 14:01:33 +00:00
lint.rs Rename struct_lint_level as lint_level. 2024-01-23 08:09:08 +11:00
macros.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs Remove outdated references to librustc_middle. 2024-01-05 16:34:52 +00:00
thir.rs Remove the lifetime from DiagnosticArgValue. 2024-01-30 18:46:06 +11:00
values.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00