about summary refs log tree commit diff
path: root/src/test/ui/const-ptr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-504/+0
2022-12-27Fix ui constant tests for big-endian platformsUlrich Weigand-275/+36
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-12-15adjust testsRalf Jung-59/+62
2022-12-15always check alignment during CTFERalf Jung-28/+32
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-157/+23
available
2022-12-06Bless 32 bit testsOli Scherer-77/+110
2022-12-06Change CTFE backtraces to use `note` instead of `label` to preserve their orderOli Scherer-101/+143
labels are reordered within the file in which they are reported, which can mess up the stack trace
2022-12-06Remove now-redundant file/line info from const backtracesOli Scherer-60/+60
2022-09-23Bless 32bit ui.Camille GILLOT-8/+8
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-8/+8
2022-08-27adjust testsRalf Jung-8/+12
2022-07-24interpret, ptr_offset_from: refactor and test too-far-apart checkRalf Jung-4/+4
2022-07-09Partially stabilize const_slice_from_raw_partsKonrad Borowski-58/+56
This doesn't stabilize methods working on mutable pointers.
2022-07-05adjust dangling-int-ptr error messageRalf Jung-10/+10
2022-07-01Shorten def_span for more items.Camille GILLOT-68/+26
2022-06-29interpret: adjust error from constructing an invalid valueRalf Jung-16/+16
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-3/+3
2022-06-09interpret: unify offset_from check with offset checkRalf Jung-4/+4
2022-05-31normalize harderMaybe Waffle-58/+59
2022-05-30normalize forbidden slicesMaybe Waffle-78/+79
2022-05-30test forbidden slices on all two usizesizesMaybe Waffle-28/+309
2022-05-30--blessMaybe Waffle-28/+28
2022-05-30Use `// error-pattern:` header in `forbidden_slices.rs` testMaybe Waffle-0/+1
2022-05-30Rename slice_from_ptr_range_const -> const_slice_from_ptr_rangeMaybe Waffle-2/+2
This is in line with other `const fn` features.
2022-05-30Add ui tests for `slice::from_{ptr_range,raw_parts}`Maybe Waffle-0/+481
2022-02-13update stderr messagesSaltyKitkat-6/+6
2022-02-13stabilize const_ptr_offsetSaltyKitkat-1/+0
2021-08-08Avoid using the `copy_nonoverlapping` wrapper through `mem::replace`.Eduard-Mihai Burtescu-30/+15
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-8/+8
2021-07-15tweak pointer out-of-bounds error messageRalf Jung-3/+3
2021-07-14adjust testsRalf Jung-3/+3
2021-07-10remove const_raw_ptr_to_usize_cast featureRalf Jung-27/+0
2021-06-27Update and bless tests for const read out of boundsAlbin Hedman-28/+36
2021-06-27Bless out_of_bounds_read testAlbin Hedman-26/+29
2021-06-27Revert "Remove tests that were also added in PR 79684."Albin Hedman-0/+75
This reverts commit e118a2cbf1e590cb5a7586ad01c6c3431c2b4f48.
2021-06-04Remove tests that were also added in PR 79684.Felix S. Klock II-75/+0
2021-02-13Auto merge of #81238 - RalfJung:copy-intrinsics, r=m-ou-sebors-29/+26
directly expose copy and copy_nonoverlapping intrinsics This effectively un-does https://github.com/rust-lang/rust/pull/57997. That should help with `ptr::read` codegen in debug builds (and any other of these low-level functions that bottoms out at `copy`/`copy_nonoverlapping`), where the wrapper function will not get inlined. See the discussion in https://github.com/rust-lang/rust/pull/80290 and https://github.com/rust-lang/rust/issues/81163. Cc `@bjorn3` `@therealprof`
2021-02-05improve error message for disallowed ptr-to-int casts in const evalJeffrey Griffin-0/+27
2021-02-03make const_err a future incompat lintRalf Jung-0/+8
2021-01-21directly expose copy and copy_nonoverlapping intrinsicsRalf Jung-26/+23
2020-12-26Add testsAlbin Hedman-0/+70