-
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
Const generic ICE: assertion failed: key.value.promoted.is_none() #61432
Comments
So what is the expected behavior here? |
@varkor why shouldn't we? Like ok, we shouldn't right now, but why shouldn't ever? We are already promoting |
Ah, that is true. It should be okay, you're right. |
Ok, awesome, I was worried for a bit that we screwed up promotion. Now let's figure out what's going wrong here. As far as I can tell, the only way to get to a |
This also happens when passing a const generic variable (directly) to |
🤣 uh, so, I found this rust/src/librustc_mir/interpret/operand.rs Line 526 in 811b996
Basically the fix is to call rust/src/librustc_mir/interpret/operand.rs Line 497 in 811b996
rust/src/librustc_mir/interpret/operand.rs Line 526 in 811b996
bug! call
This change is blocked on the |
Making this change: - Constant(ref constant) => self.eval_const_to_op(constant.literal, layout)?,
+ Constant(ref constant) => {
+ self.eval_const_to_op(self.monomorphize(constant.literal)?, layout)?
+ } results in:
while compiling rustc.
|
heh, one can always trust in can you run with |
ah, unfortunately the rustc you're using is built without debug flags, so we're only getting |
Oops. If no one has posted yet, I'll paste later. |
Here's the lower section. I can post more if this doesn't contain all the relevant information, but the full trace is long.
|
try dumping the stackframe size, the
[] as substs, but it should be [f32] , maybe we're looking at the wrong thing
|
@JohnTitor: you're welcome to take this issue. I'm not sure I'll have time to debug this soon. |
@oli-obk How we try dumping the stackframe size? |
you can use |
rustc_mir: fix miri substitution/"universe" discipline. Alternative to rust-lang#61041, based on @RalfJung's own attempt at it. I haven't done a full audit, but I believe everything is fixed now. Fixes rust-lang#61432. Closes rust-lang#61336, as a drive-by fix (for a subset of rust-lang#43408, that is already special-cased). r? @oli-obk / @RalfJung cc @varkor @yodaldevoid
Promotion of const generic parameters causes the compiler to crash.
The text was updated successfully, but these errors were encountered: