-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: index out of bounds: the len is 0 but the index is 18446744073709551615 #83993
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
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
DutchGhost
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
Apr 8, 2021
jonas-schievink
added
A-const-generics
Area: const generics (parameters and arguments)
F-const_generics
`#![feature(const_generics)]`
labels
Apr 8, 2021
This index is at 2^64-1 aka "-1" (for an |
fanninpm
added a commit
to fanninpm/glacier
that referenced
this issue
Apr 9, 2021
Issue: rust-lang/rust#83993
I think this one is a better repo, as #![feature(const_generics)]
fn bad() where for<'b> [();{let _:&'b (); 0}]: Sized { }
fn good() where for<'b> [();{0}]: Sized { } Seems that if HRTB contains a const expr and the const expr uses HRTB lifetimes. It will complain that escaping bound var in predict for "let _:&'b()" |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
May 9, 2023
…ently, r=cjgillot Various changes to name resolution of anon consts Sorry this PR is kind of all over the place ^^' Fixes rust-lang#111012 - Rewrites anon const nameres to all go through `fn resolve_anon_const` explicitly instead of `visit_anon_const` to ensure that we do not accidentally resolve anon consts as if they are allowed to use generics when they aren't. Also means that we dont have bits of code for resolving anon consts that will get out of sync (i.e. legacy const generics and resolving path consts that were parsed as type arguments) - Renames two of the `LifetimeRibKind`, `AnonConst -> ConcreteAnonConst` and `ConstGeneric -> ConstParamTy` - Noticed while doing this that under `generic_const_exprs` all lifetimes currently get resolved to errors without any error being emitted which was causing a bunch of tests to pass without their bugs having been fixed, incidentally fixed that in this PR and marked those tests as `// known-bug:`. I'm fine to break those since `generic_const_exprs` is a very unstable incomplete feature and this PR _does_ make generic_const_exprs "less broken" as a whole, also I can't be assed to figure out what the underlying causes of all of them are. This PR reopens rust-lang#77357 rust-lang#83993 - Changed `generics_of` to stop providing generics and predicates to enum variant discriminant anon consts since those are not allowed to use generic parameters - Updated the error for non 'static lifetime in const arguments and the error for non 'static lifetime in const param tys to use `derive(Diagnostic)` I have a vague idea why const-arg-in-const-arg.rs, in-closure.rs and simple.rs have started failing which is unfortunate since these were deliberately made to work, I think lifetime resolution being broken just means this regressed at some point and nobody noticed because the tests were not testing anything :( I'm fine breaking these too for the same reason as the tests for rust-lang#77357 rust-lang#83993. I couldn't get `// known-bug` to work for these ICEs and just kept getting different stderr between CI and local `--bless` so I just removed them and will create an issue to track re-adding (and fixing) the bugs if this PR lands. r? `@cjgillot` cc `@compiler-errors`
reopening after #111215 |
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)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
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
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: