diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-09-10 17:46:30 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-09-11 11:27:12 +0200 |
| commit | d1b5231aa75d6c25efc839454331d3c9fb09ffb3 (patch) | |
| tree | 8bfa3313997d78526da9d9575f3c6bc555b68972 /src/test/ui/consts/const-eval | |
| parent | 24dca6aecaded209d47aba6e60e0b87eae2d49d6 (diff) | |
| download | rust-d1b5231aa75d6c25efc839454331d3c9fb09ffb3.tar.gz rust-d1b5231aa75d6c25efc839454331d3c9fb09ffb3.zip | |
Fix const eval of ZST index operations to make the static assertion work
Diffstat (limited to 'src/test/ui/consts/const-eval')
| -rw-r--r-- | src/test/ui/consts/const-eval/zst_operand_eval.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-eval/zst_operand_eval.rs b/src/test/ui/consts/const-eval/zst_operand_eval.rs new file mode 100644 index 00000000000..c6deb88d4f1 --- /dev/null +++ b/src/test/ui/consts/const-eval/zst_operand_eval.rs @@ -0,0 +1,5 @@ +// compile-pass + +static ASSERT: () = [()][(std::mem::size_of::<u32>() != 4) as usize]; + +fn main() {} |
