-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
fix generalizer unsoundness #121479
fix generalizer unsoundness #121479
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use r? to explicitly pick a reviewer |
Type relation code was changed |
I ended up getting confused while trying to flip the variances when flipping the order. Should be all right now
This comment has been minimized.
This comment has been minimized.
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.
pls fix ci, r=me
@bors r=compiler-errors rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121434 (Fix rust-lang#121208 fallout) - rust-lang#121471 (When encountering `<&T as Clone>::clone(x)` because `T: Clone`, suggest `#[derive(Clone)]`) - rust-lang#121476 (remove `llvm.assertions=true` in compiler profile) - rust-lang#121479 (fix generalizer unsoundness) - rust-lang#121480 (Fix more rust-lang#121208 fallout) - rust-lang#121482 (Allow for a missing `adt_def` in `NamePrivacyVisitor`.) - rust-lang#121484 (coverage: Use variable name `this` in `CoverageGraph::from_mir`) - rust-lang#121487 (Explicitly call `emit_stashed_diagnostics`.) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#121434 (Fix rust-lang#121208 fallout) - rust-lang#121471 (When encountering `<&T as Clone>::clone(x)` because `T: Clone`, suggest `#[derive(Clone)]`) - rust-lang#121476 (remove `llvm.assertions=true` in compiler profile) - rust-lang#121479 (fix generalizer unsoundness) - rust-lang#121480 (Fix more rust-lang#121208 fallout) - rust-lang#121482 (Allow for a missing `adt_def` in `NamePrivacyVisitor`.) - rust-lang#121484 (coverage: Use variable name `this` in `CoverageGraph::from_mir`) - rust-lang#121487 (Explicitly call `emit_stashed_diagnostics`.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121479 - lcnr:fix-generalize, r=compiler-errors fix generalizer unsoundness I ended up getting confused while trying to flip the variances when flipping the order. Should be all right now. This is only exploitable when generalizing if the `ambient_variance` of the relation is `Contravariant`. This can currently only be the case in the NLL generalizer which only rarely generalizes, causing us to miss this regression. Very much an issue with rust-lang#121462 however.
I ended up getting confused while trying to flip the variances when flipping the order. Should be all right now.
This is only exploitable when generalizing if the
ambient_variance
of the relation isContravariant
. This can currently only be the case in the NLL generalizer which only rarely generalizes, causing us to miss this regression. Very much an issue with #121462 however.