rust/tests
bors 3406ada96f Auto merge of #117658 - RalfJung:ptr-dangling, r=m-ou-se
rename ptr::invalid -> ptr::without_provenance

It has long bothered me that `ptr::invalid` returns a pointer that is actually valid for zero-sized memory accesses. In general, it doesn't even make sense to ask "is this pointer valid", you have to ask "is this pointer valid for a given memory access". We could say that a pointer is invalid if it is not valid for *any* memory access, but [the way this FCP is going](https://github.com/rust-lang/unsafe-code-guidelines/issues/472), it looks like *all* pointers will be valid for zero-sized memory accesses.

Two possible alternative names emerged as people's favorites:
1. Something involving `dangling`, in analogy to `NonNull::dangling`. To avoid inconsistency with the `NonNull` method, the address-taking method could be called `dangling_at(addr: usize) -> *const T`.
2. `without_provenance`, to be symmetric with the inverse operation `ptr.addr_without_provenance()` (currently still called `ptr.addr()` but probably going to be renamed)

I have no idea which one of these is better. I read [this comment](https://github.com/rust-lang/rust/pull/117658#issuecomment-1830934701) as expressing a slight preference for something like the second option, so I went for that. I'm happy to go with `dangling_at` as well.

Cc `@rust-lang/opsem`
2024-02-21 21:48:38 +00:00
..
assembly Bless/fix tests 2024-02-08 19:56:30 -05:00
auxiliary
codegen Auto merge of #120718 - saethlin:reasonable-fast-math, r=nnethercote 2024-02-21 09:43:33 +00:00
codegen-units Update tests 2024-02-07 10:42:01 +08:00
coverage Update coverage-run tests 2024-02-18 20:51:45 +03:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo update debuginfo test 2024-02-16 12:10:50 +01:00
incremental Auto merge of #120919 - oli-obk:impl_polarity, r=compiler-errors 2024-02-13 02:48:49 +00:00
mir-opt rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
pretty Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
run-make Update data layouts in custom target tests for LLVM 18 2024-01-31 15:15:59 +01:00
run-make-fulldeps Make CodegenBackend::join_codegen infallible. 2024-02-17 10:51:35 +11:00
run-pass-valgrind
rustdoc Rollup merge of #121218 - ShoyuVanilla:fix-issue-76736, r=notriddle 2024-02-18 05:10:18 +01:00
rustdoc-gui Add regression test for #120471 to ensure that long crate name are handled as expected on mobile 2024-01-31 16:40:23 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Clean inlined type alias with correct param-env 2024-02-12 04:51:49 +00:00
ui Rollup merge of #121359 - lcnr:typesystem-cleanup, r=compiler-errors 2024-02-21 16:32:58 +01:00
ui-fulldeps Merge diagnostic_builder.rs into diagnostic.rs. 2024-02-21 11:03:31 +11:00
COMPILER_TESTS.md