Fix ICE with const generic param in struct#59355
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 24, 2019
Merged
Conversation
| if let Some(Rib { kind: FnItemRibKind, .. }) = ribs.peek() { | ||
| // When declaring const parameters inside function signatures, the first rib | ||
| // is always a `FnItemRibKind`. In this case, we can skip it, to avoid it | ||
| // (spuriously) conflicting with the const param. |
Contributor
There was a problem hiding this comment.
Could you give an example of "spuriously conflicting with the const param"? Is there a test?
Contributor
Author
There was a problem hiding this comment.
Any function definition with a const generic parameter would conflict. E.g.
rust/src/test/ui/const-generics/const-expression-parameter.rs
Lines 4 to 6 in f94f85b
Contributor
|
One significant question (#59355 (comment)), otherwise r=me. |
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit 5032643 has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Mar 24, 2019
…trochenkov Fix ICE with const generic param in struct Fixes rust-lang#59340. r? @petrochenkov
bors
added a commit
that referenced
this pull request
Mar 24, 2019
Rollup of 7 pull requests Successful merges: - #59213 (Track changes to robots.txt) - #59239 (Remove inline assembly from hint::spin_loop) - #59251 (Use a valid name for graphviz graphs) - #59296 (Do not encode gensymed imports in metadata) - #59328 (Implement specialized nth_back() for Box and Windows.) - #59355 (Fix ICE with const generic param in struct) - #59377 (Correct minimum system LLVM version in tests)
16 tasks
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 #59340.
r? @petrochenkov