Fix bad span of well-formed evaluation overflow - #158840
Conversation
|
changes to the core type system cc @lcnr |
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
The original issue also requires more detailed indication on the problematic type. But since the evaluation is cyclic and the real type is never inferred, it would be tricky to print the concrete type in the message, so I didn't impl it in the PR. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fix bad span of well-formed evaluation overflow
|
r? lcnr |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (b972397): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.2%, secondary -1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 4.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 487.42s -> 491.122s (0.76%) |
|
☔ The latest upstream changes (presumably #158731) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
There was a problem hiding this comment.
sorry for the late review. My vibe is that this change feels somewhat too targeted and I dislike tracking additional information in the type variable storage without that being "core" to the type system. It makes it harder to reason about things and I generally feel somewhat worried about the perf impact/complexity of doing this.
I think as a more general things the well-formedness goal is not what "causes" overflows here. We should have some Subtype obligations which cause the fulfillment context to overflow instead. And these should already have the correct spans 🤔
Can you look into whether there's also a fulfillment error for a subtype obligation we could point to instead
Fixes #157619
Refine bad span of well-formed evaluation overflow