Fix miscompilation when calling default methods on Future#111354
Merged
bors merged 1 commit intorust-lang:masterfrom May 8, 2023
jonas-schievink:enable-future-combinators
Merged
Fix miscompilation when calling default methods on Future#111354bors merged 1 commit intorust-lang:masterfrom jonas-schievink:enable-future-combinators
Future#111354bors merged 1 commit intorust-lang:masterfrom
jonas-schievink:enable-future-combinators
Conversation
compiler-errors
approved these changes
May 8, 2023
Contributor
compiler-errors
left a comment
There was a problem hiding this comment.
Squash this into one commit, then r=me
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 8, 2023
…mpiler-errors Rollup of 6 pull requests Successful merges: - rust-lang#104070 (Prevent aborting guard from aborting the process in a forced unwind) - rust-lang#109410 (Introduce `AliasKind::Inherent` for inherent associated types) - rust-lang#111004 (Migrate `mir_transform` to translatable diagnostics) - rust-lang#111118 (Suggest struct when we get colon in fileds in enum) - rust-lang#111170 (Diagnostic args are still args if they're documented) - rust-lang#111354 (Fix miscompilation when calling default methods on `Future`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #111264 I discovered a lingering miscompilation when calling a default method on
Future(none currently exist). #111279 added a debug assertion, which sadly doesn't help much since to my knowledge stage0 is not built with them enabled, and it still doesn't make default methods work like they should.This PR fixes
resolve_instanceto resolve default methods onFuturecorrectly, allowing library contributors to addFuturecombinators without running into ICEs or miscompilations. I've tested this as part of #111347, but no test is included here (assuming that future methods include their own tests that would cover this sufficiently).r? @compiler-errors