-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ReEmpty #98559
Remove ReEmpty #98559
Conversation
This comment has been minimized.
This comment has been minimized.
da99507
to
531c765
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #98591) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #98542) made this pull request unmergeable. Please resolve the merge conflicts. |
Blocked on #98795 and some fiddling with the best way to the |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #98584) made this pull request unmergeable. Please resolve the merge conflicts. |
…anup, r=compiler-errors A few cleanups Each commit is (mostly) self-explanatory. These changes have come as I try to remove `ReEmpty` (rust-lang#98559).
…anup, r=compiler-errors A few cleanups Each commit is (mostly) self-explanatory. These changes have come as I try to remove `ReEmpty` (rust-lang#98559).
…anup, r=compiler-errors A few cleanups Each commit is (mostly) self-explanatory. These changes have come as I try to remove `ReEmpty` (rust-lang#98559).
cb38214
to
fa7b0bb
Compare
I think this is good to go. The problem I was facing before went away on its own. |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
cc @compiler-errors ICEy interactions with 🐸 types (RPITIT) |
I'll look into it this weekend |
Equate fn outputs when inferring RPITIT hidden types When we are trying to infer the hidden types for RPITITs, we need to equate the output tys instead of just subtyping them. For example: ```rust trait Foo { fn bar() -> impl Sized {} } impl Foo for () { fn bar() -> &'static str { "" } } ``` If we just subtype the signatures `fn() -> &'static str <: fn() -> _#1t` (where `_#1t` is the variable we've used to infer `impl Sized`), we'll end up `&'static str <: _#1t`, which causes us to infer `_#1t = #'_#2r str`, where `'_#2r` is unconstrained, which gets fixed up to `ReEmpty`, and which is certainly not what we want. I can't actually think of a way to make this fail to compile, because during borrowck we've already done the method probe, and so we just look at the `impl` method signature and see the `&'static str` any time we call `<() as Foo>::bar()`. But this _does_ cause the ICE [here](rust-lang#98559 (comment)) in `@jackh726's` "Remove ReEmpty" PR (rust-lang#98559) to stop ICEing, because after that PR we were leaking unconstrained region variables into the typeck results. r? types
(VarValue::Empty(a_ui), VarValue::Empty(b_ui)) => { | ||
// Empty regions are ordered according to the universe | ||
// they are associated with. | ||
a_ui.min(b_ui) == b_ui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this not a >= b
? or am I misunderstanding what min
is doing?
☀️ Test successful - checks-actions |
Finished benchmarking commit (2287107): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
@jackh726 seeing an ICE which bisected to this merge, stacktrace:
I will try to produce a MRE |
Remove ReEmpty r? rust-lang/types
I just tried the latest nightly (2022-10-11) after 1 month and this patch still causes an ICE. Is it something that can be solved easily or planned to be fixed? |
r? rust-lang/types