-
Notifications
You must be signed in to change notification settings - Fork 13k
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
"Broken MIR" ICE when trying to use const generics #60923
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
jonas-schievink
added
A-const-generics
Area: const generics (parameters and arguments)
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
May 17, 2019
If this helps, similar errors are produced by this code: #![feature(const_generics)]
#[derive(PartialEq)]
struct S<T, const N: usize>([T; N]);
fn main() {}
|
I've confirmed locally that this is fixed by #60742. |
I wonder whether PR #60742 needs an additional test case or whether one could just close this bug after the PR. |
@davidtwco: thanks for checking that out! I've added the two test cases here to #60742. |
Centril
added a commit
to Centril/rust
that referenced
this issue
May 28, 2019
…eddyb Allow const parameters in array sizes to be unified Fixes rust-lang#60632. Fixes rust-lang#60744. Fixes rust-lang#60923. (The last commit should probably be viewed in isolation, as it just renames things from `type` to `kind`.) r? @eddyb
Centril
added a commit
to Centril/rust
that referenced
this issue
May 28, 2019
…eddyb Allow const parameters in array sizes to be unified Fixes rust-lang#60632. Fixes rust-lang#60744. Fixes rust-lang#60923. (The last commit should probably be viewed in isolation, as it just renames things from `type` to `kind`.) r? @eddyb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code like this
Gives ICE errors like this:
The text was updated successfully, but these errors were encountered: