Fix const eval of ZST index operations to make the static assertion work
This commit is contained in:
parent
24dca6aeca
commit
d1b5231aa7
2 changed files with 15 additions and 4 deletions
5
src/test/ui/consts/const-eval/zst_operand_eval.rs
Normal file
5
src/test/ui/consts/const-eval/zst_operand_eval.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// compile-pass
|
||||
|
||||
static ASSERT: () = [()][(std::mem::size_of::<u32>() != 4) as usize];
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue