-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE when using a const fn with an if statement as an array length #75153
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
fixed-by-const-generics
Enabling feature `const_generics` fixes the issue.
glacier
ICE tracked in rust-lang/glacier.
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
Soveu
added
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
Aug 4, 2020
lcnr
added
A-const-generics
Area: const generics (parameters and arguments)
F-const_generics
`#![feature(const_generics)]`
labels
Aug 5, 2020
lcnr
changed the title
ICE inside const fn caused by if statement
ICE when using const fn with an if statement as an array length
Aug 5, 2020
lcnr
changed the title
ICE when using const fn with an if statement as an array length
ICE when using a const fn with an if statement as an array length
Aug 5, 2020
This errors correctly with |
varkor
added
the
fixed-by-const-generics
Enabling feature `const_generics` fixes the issue.
label
Sep 13, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Oct 5, 2020
…lcnr,estebank Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics` Closes rust-lang#61410. Adds `min_const_generics` tests for: - rust-lang#73727 - rust-lang#72293 - rust-lang#67375 - rust-lang#75153 - rust-lang#71922 - rust-lang#69913 - rust-lang#67945 - rust-lang#69239 Adds `const_generics` tests for: - rust-lang#67375 - rust-lang#75153 - rust-lang#71922 - rust-lang#69913 - rust-lang#67945 - rust-lang#69239 (I only added separate `min_const_generics` and `const_generics` tests if they were handled differently by the two features.) We need to figure out how to deduplicate when `const_generics` is stabilised, but we can discuss that later. For now, we should be checking neither feature breaks, so require regression tests for both. I've given them identical names when I've added both, which should make it easier to spot them later. r? @lcnr
Triage: The current output with the latest nightly
with #![feature(const_generics)]
Neither is ICE. |
JohnTitor
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Dec 30, 2020
will require |
For future reference, you don't need/want |
RalfJung
added
the
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
label
Dec 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
fixed-by-const-generics
Enabling feature `const_generics` fixes the issue.
glacier
ICE tracked in rust-lang/glacier.
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
Meta
rustc --version --verbose
:The bug also does occur in beta version.
Stable versions do not support
if
statements insideconst fn
Error output
Backtrace
The text was updated successfully, but these errors were encountered: