-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ICE: eval_const_to_op: Unexpected ConstKind #74634
Comments
That's happening here: rust/src/librustc_mir/interpret/operand.rs Line 567 in 06e7b93
I don#t think there is a meaningful way to evaluate a polymorphic constant, so either some code earlier screwed up to even get so far, or we need to throw |
cc @lcnr This ICE is totally expected. Using features that emit the |
hmm, we shouldn't try to evaluate this constant here or at least have it be a Not quite sure what's going on here, will have to look at it in more detail soon |
So we probably fail here because we call All of that seems correct to me 🤔 Is it possible that we should treat |
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
(Playground)
Errors:
Probably related: #72819
Removing (at least) one of the
impl
s forFoobar
makes the panic go away, and the compiler correctly reports the error:@rustbot modify labels: I-ICE, T-compiler, A-const-eval, A-const-generics, C-bug, F-const_generics, requires-nightly
The text was updated successfully, but these errors were encountered: