Fix ICE when lowering trait A where for<'a> Self: 'a#91308
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 28, 2021
Merged
Fix ICE when lowering trait A where for<'a> Self: 'a#91308bors merged 2 commits intorust-lang:masterfrom
trait A where for<'a> Self: 'a#91308bors merged 2 commits intorust-lang:masterfrom
Conversation
Fixes the ICE in rust-lang#88586.
This comment has been minimized.
This comment has been minimized.
JohnTitor
reviewed
Nov 28, 2021
Member
JohnTitor
left a comment
There was a problem hiding this comment.
Thanks for fixing it! Left one nit about the test.
| // Regression test for #88586: a higher-ranked outlives bound on Self in a trait | ||
| // definition caused an ICE when debug_assertions were enabled. | ||
| // | ||
| // The error output is incidentally unhelpful; this should be improved. |
Member
There was a problem hiding this comment.
Adding FIXME: prefix would be helpful as we can pick it up by grepping in the future.
jackh726
approved these changes
Nov 28, 2021
Member
jackh726
left a comment
There was a problem hiding this comment.
This is a much more targeted fix, but perfectly acceptable.
One small comment (that is unrelated). And FIXME. Other than that, LGTM.
Great job here 🙂
compiler/rustc_typeck/src/collect.rs
Outdated
| &mut bounds, | ||
| ty::List::empty(), | ||
| ); | ||
| astconv.add_bounds(param_ty, std::array::IntoIter::new([bound]), &mut bounds, bound_vars); |
Member
There was a problem hiding this comment.
Drive by thought: can this be replaced by [bound].into_iter() now?
Member
|
@bors r+ rollup |
Collaborator
|
📌 Commit 6df2c78 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 28, 2021
…askrgr Rollup of 3 pull requests Successful merges: - rust-lang#91251 (Perform Sync check on static items in wf-check instead of during const checks) - rust-lang#91308 (Fix ICE when lowering `trait A where for<'a> Self: 'a`) - rust-lang#91319 (Change output path to {{build-base}} for rustdoc scrape_examples ui test) 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.
Fixes #88586.
r? @jackh726
Jack, this fix is much smaller in scope than what I think you were proposing in the issue. Let me know if you had a vision for a larger refactor here.
cc @JohnTitor