Do not add implied outlives bounds containing external regions/params only#153027
Do not add implied outlives bounds containing external regions/params only#153027ShoyuVanilla wants to merge 1 commit intorust-lang:mainfrom
Conversation
| // for it, we might fail with the type test for it, which contains the opaque type | ||
| // and therefore `'b` as well. The problem is that if the normalized opaque type doesn't | ||
| // mentions `'b`, we have no local free region constrained by it, and end up | ||
| // emitting a borrowck error instead of propagating the closure requirements. |
There was a problem hiding this comment.
Filtering external bounds here regresses this
|
@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.
Do not add outlives implied bounds that contains external regions/params only
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (484ac15): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary 0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 481.498s -> 479.757s (-0.36%) |
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
This doesn't feel correct. I think I should rather add implied bounds as before and directly propagate them again as requirements. |
|
🗑️ Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Fixes #151637
The actuall cause wasn't that the closure's return type is wf checked.
For example, the following code is errored out as intended:
The problem was that we are adding implied bound
T: 'staticeven when borrowck-ing the closures.