about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/ub-nonnull.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-59/+0
2022-12-27Fix ui constant tests for big-endian platformsUlrich Weigand-1/+3
A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files. Fix this by providing a normalize-stderr-test rule that strips out the raw bytes hex dump, so the comparison can be done in an endianness-independent manner. Note that in most cases, this means the tests are now also independent of word size, so the 32bit and 64bit cases can be re-unified. To keep tests that verify the details of those raw bytes dumps, a new test case raw-bytes.rs performs the tests where the hex dumps were stripped out a second time, but only on little- endian platforms. In addition, src/test/ui/const-ptr/forbidden_slices.rs exposes an endian-specific difference in this diagnostic output: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean depending on which byte of D0 is not a boolean value (0 or 1). Fixed this by choosing a value of D0 that differs from 0 or 1 in all bytes. Fixes part of https://github.com/rust-lang/rust/issues/105383.
2022-11-25Add a test for scalar pair layout validationOli Scherer-1/+8
2022-10-07make const_err a hard errorRalf Jung-2/+1
2022-08-26make read_immediate error immediately on uninit, so ImmTy can carry ↵Ralf Jung-1/+2
initialized Scalar
2021-06-18bless youRalf Jung-2/+1
2021-05-02Change 'NULL' to 'null'Brent Kerby-1/+1
2021-03-31Rename stderr->64bit.stderr where needed.Hameer Abbasi-0/+1
2021-02-03make const_err a future incompat lintRalf Jung-0/+1
2020-07-11Stabilize `transmute` in constants and statics but not const fnOliver Scherer-1/+1
2020-03-06const validation ub tests: use transmute instead of unionsRalf Jung-3/+3
2019-08-30const-eval tests: make all unions repr(C)Ralf Jung-0/+1
2019-08-17fix testsRalf Jung-1/+1
2019-07-28fix testsRalf Jung-3/+4
2019-07-04turns out that dangling pointer branch is dead code; remove it and improve ↵Ralf Jung-0/+10
the error that actually gets shown a bit
2019-01-21fix validation range printing when encountering undefRalf Jung-0/+7
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-07test diagnostics for more rangesRalf Jung-1/+15
2018-11-05fix validation error on non-integer enum discriminantsRalf Jung-0/+1
2018-10-25Rebase falloutOliver Schneider-3/+3
2018-10-09also validate everything that has a Scalar layout, to catch NonNullRalf Jung-0/+25