-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
use equality in the coerce-unsized check #41937
use equality in the coerce-unsized check #41937
Conversation
36717ea
to
138a4c8
Compare
Is there even an example that needs subtyping there? |
📌 Commit 138a4c8 has been approved by |
…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
…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 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. |
@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
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 |
@bors r+ |
📌 Commit 6db4beb has been approved by |
…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
Does not cherry-pick cleanly cc @nikomatsakis |
Approving for beta. Will backport. cc @rust-lang/compiler |
…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)
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)
…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 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