mir: accept ambiguous unsize coercion validation results - #161156
mir: accept ambiguous unsize coercion validation results#161156rabindra789 wants to merge 1 commit into
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
66bc779 to
2b2270d
Compare
This comment has been minimized.
This comment has been minimized.
2b2270d to
570abd8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
FYI, adding a method to the |
Thanks for the extra detail. I will check the test with a trait method and reproduce the p-m error on my side |
|
Anyway, this is T-types's "jurisdiction", so r? types |
The MIR validator currently treats ambiguous and old-solver cycle results as definite failures when checking Unsize coercions. This can ICE on valid post-monomorphization MIR. Only definite trait evaluation errors should make this validation fail; ambiguity and cycle results are deliberately accepted. Add a regression test for the post-monomorphization cycle case.
570abd8 to
bd379de
Compare
did you come to any conclusion? Is there sth relevant that could be tested? |
Yaa i tested it with a full build on both base and the PR. |
|
@rustbot review |
Fixes #155538
MIR validator might ICE on unsize coercion after monomorphization because the obligation may fall into a cycle, but that doesn't make coercion invalid.
Modified the test report only definitive errors and accept cycle results also added a test for the ICE bug.