use equality in the coerce-unsized check#41937
Merged
bors merged 1 commit intorust-lang:masterfrom May 17, 2017
Merged
Conversation
36717ea to
138a4c8
Compare
Contributor
|
Is there even an example that needs subtyping there? |
Member
Collaborator
|
📌 Commit 138a4c8 has been approved by |
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this pull request
May 12, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this pull request
May 12, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
Contributor
Author
|
@Mark-Simulacrum note that travis seems to not like this; I don't have time to fix just now (boarding a plane), but you may want to pull it out of your rollup. =) It looks like the fix didn't work, but that's odd, as I don't see that locally. |
Member
|
@bors r- |
This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41936. Fixes rust-lang#41936.
138a4c8 to
6db4beb
Compare
Contributor
Author
|
ok, I think I found the problem, it was an interaction between this PR and another PR that had merged (but wasn't in my local repo, hence the disparity in the results). re-r? @eddyb |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 6db4beb has been approved by |
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this pull request
May 16, 2017
…oerce-unsized-cycle, r=eddyb use equality in the coerce-unsized check This seems both to be a safe, conservative choice, and it sidesteps the cycle in rust-lang#41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.) Fixes rust-lang#41936. r? @eddyb
Contributor
|
Does not cherry-pick cleanly cc @nikomatsakis |
Contributor
Author
|
Approving for beta. Will backport. cc @rust-lang/compiler |
Merged
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Apr 16, 2024
…mpiler-errors Prefer identity equality over equating types during coercion. These types are always generic only over their own generic parameters with no inference variables involved. r? `@compiler-errors` I love touching code that [hasn't changed meaningfully since 2016](rust-lang#41937)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 17, 2024
Rollup merge of rust-lang#124027 - oli-obk:define_opaque_types9, r=compiler-errors Prefer identity equality over equating types during coercion. These types are always generic only over their own generic parameters with no inference variables involved. r? `@compiler-errors` I love touching code that [hasn't changed meaningfully since 2016](rust-lang#41937)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Apr 17, 2024
…rors Prefer identity equality over equating types during coercion. These types are always generic only over their own generic parameters with no inference variables involved. r? `@compiler-errors` I love touching code that [hasn't changed meaningfully since 2016](rust-lang/rust#41937)
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.
This seems both to be a safe, conservative choice, and it sidesteps the cycle in #41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.)
Fixes #41936.
r? @eddyb