-
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
Stop using Bubble in coherence and instead emulate it with an intercrate check #121744
Conversation
@@ -146,7 +146,11 @@ impl<'tcx> InferCtxt<'tcx> { | |||
} | |||
} | |||
DefiningAnchor::Bubble => {} | |||
DefiningAnchor::Error => return None, | |||
DefiningAnchor::Error => { | |||
if !self.intercrate { |
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.
Aren't we sometimes emitting alias-relate goals in coherence? Or we planned to do so? Perhaps we could just do that and assert against self.intercrate
in this function.
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.
We're def not doing that right now. I presumed we didn't want to touch old coherence anymore and just wait until it gets replaced by the new solver, which doesn't care about the bubble/error distinction anyway.
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.
can you change it to match on DefiningAnchor
only if intercrate
is false instead? Only having the intercrate check in the Error
branch feels weird 🤔
prefer if lcnr reviews this r? lcnr |
d5f39d3
to
836ac98
Compare
@bors r+ rollup |
Stop using Bubble in coherence and instead emulate it with an intercrte check r? `@compiler-errors` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
Stop using Bubble in coherence and instead emulate it with an intercrte check r? ``@compiler-errors`` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#119199 (Add arm64ec-pc-windows-msvc target) - rust-lang#121416 (Improve error messages for generics with default parameters) - rust-lang#121475 (Add tidy check for .stderr/.stdout files for non-existent test revisions) - rust-lang#121736 (Remove `Mutex::unlock` Function) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrte check) - rust-lang#121784 (Make the success arms of `if lhs || rhs` meet up in a separate block) - rust-lang#121818 (CFI: Remove unused `typeid_for_fnsig`) - rust-lang#121819 (Handle stashing of delayed bugs) - rust-lang#121828 (Remove unused fluent messages) - rust-lang#121831 (Fix typo in comment) r? `@ghost` `@rustbot` modify labels: rollup
836ac98
to
c98be32
Compare
@bors r=lcnr |
Stop using Bubble in coherence and instead emulate it with an intercrate check r? `@compiler-errors` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
Stop using Bubble in coherence and instead emulate it with an intercrate check r? ``@compiler-errors`` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
Stop using Bubble in coherence and instead emulate it with an intercrate check r? ```@compiler-errors``` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#121905 (Add a `description` field to target definitions) - rust-lang#122022 (loongarch: add frecipe and relax target feature) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
Stop using Bubble in coherence and instead emulate it with an intercrate check r? ````@compiler-errors```` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121832 (Add new Tier-3 target: `loongarch64-unknown-linux-musl`) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#121744 - oli-obk:eager_opaque_checks2, r=lcnr Stop using Bubble in coherence and instead emulate it with an intercrate check r? `````@compiler-errors````` This change is kinda funny, because all I've done is reimplement `Bubble` behaviour for coherence without using `Bubble` explicitly.
r? @compiler-errors
This change is kinda funny, because all I've done is reimplement
Bubble
behaviour for coherence without usingBubble
explicitly.