Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #129977

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7627a54
Call the target libdir target libdir
Noratrieb Jun 7, 2024
318b4f3
Sort impl associated items by kinds and then by appearance
GuillaumeGomez Aug 23, 2024
b7cd99d
Add regression test for impl associated items sorting
GuillaumeGomez Aug 23, 2024
846cb34
Make impl associated constants sorted first
GuillaumeGomez Aug 25, 2024
78971f3
Add missing sidebar associated items
GuillaumeGomez Aug 26, 2024
4a80840
Add regression test for sidebar associated items
GuillaumeGomez Aug 26, 2024
1ef4f5d
clarify that addr_of creates read-only pointers
RalfJung Aug 27, 2024
b5bd0fe
addr_of on places derived from raw pointers should preserve permissions
RalfJung Aug 27, 2024
21edc73
bootstrap: Try to track down why `initial_libdir` sometimes fails
Zalathar Aug 30, 2024
0402394
Add an internal lint that warns when accessing untracked data
Nadrieril Aug 9, 2024
b5d07fd
copy rustc rustlib artifacts from ci-rustc
onur-ozkan Sep 3, 2024
e98e88b
rustc_codegen_llvm: fix a regression where backchain feature ...
liushuyu Sep 3, 2024
98f74b4
explain why Rvalue::Len still exists
RalfJung Sep 3, 2024
f3efe3d
Add compat note for trait solver change
Mark-Simulacrum Sep 3, 2024
e2484be
docs: add digit separators in `Duration` examples
LiterallyVoid Sep 3, 2024
4df28b8
forward linker option to lint-docs
chenx97 Sep 4, 2024
9cb6d12
use the bootstrapped compiler for `test-float-parse` test
onur-ozkan Sep 3, 2024
93b4b2d
Temporarily remove fmease from the review rotation
fmease Sep 4, 2024
6e4c5c1
tests: add an assembly scanning test for s390x backchain switch
liushuyu Sep 3, 2024
cd2ce8d
Rollup merge of #126136 - Noratrieb:bootstrap-naming, r=onur-ozkan
matthiaskrgr Sep 5, 2024
7440221
Rollup merge of #128919 - Nadrieril:lint-query-leaks, r=cjgillot
matthiaskrgr Sep 5, 2024
9d2525a
Rollup merge of #129471 - GuillaumeGomez:sort-impl-associated-items, …
matthiaskrgr Sep 5, 2024
7c78780
Rollup merge of #129653 - RalfJung:addr-of-read-only, r=scottmcm
matthiaskrgr Sep 5, 2024
dd8ba78
Rollup merge of #129775 - Zalathar:initial-libdir, r=albertlarsan68
matthiaskrgr Sep 5, 2024
f950a0d
Rollup merge of #129939 - RalfJung:rvalue-len, r=compiler-errors
matthiaskrgr Sep 5, 2024
5dbbd00
Rollup merge of #129940 - liushuyu:s390x-target-features, r=RalfJung
matthiaskrgr Sep 5, 2024
5118e61
Rollup merge of #129942 - onur-ozkan:building-rustc-tools, r=Kobzol
matthiaskrgr Sep 5, 2024
f22677b
Rollup merge of #129943 - onur-ozkan:test-float-parse-compiler, r=Kobzol
matthiaskrgr Sep 5, 2024
7cbbded
Rollup merge of #129944 - Mark-Simulacrum:relnotes-tweak, r=pietroalbini
matthiaskrgr Sep 5, 2024
5ed7989
Rollup merge of #129947 - LiterallyVoid:duration-docs-digit-separator…
matthiaskrgr Sep 5, 2024
ffa8421
Rollup merge of #129955 - fmease:fmease-break, r=fmease
matthiaskrgr Sep 5, 2024
4ce79bc
Rollup merge of #129957 - chenx97:lint-docs-linker-opt, r=albertlarsan68
matthiaskrgr Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
addr_of on places derived from raw pointers should preserve permissions
  • Loading branch information
RalfJung committed Aug 28, 2024
commit b5bd0fe48a0427a82804759a5acd795851c65e4b
10 changes: 7 additions & 3 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,9 +2285,13 @@ impl<F: FnPtr> fmt::Debug for F {
/// `addr_of!(expr)` is equivalent to `&raw const expr`. The macro is *soft-deprecated*;
/// use `&raw const` instead.
///
/// It is still an open question whether writing through an `addr_of!`-created pointer is permitted
/// or not. Until that is decided, the same rules as for shared references apply: it is UB to write
/// through a pointer created with this operation, except for bytes located inside an `UnsafeCell`.
/// It is still an open question under which conditions writing through an `addr_of!`-created
/// pointer is permitted. If the place `expr` evaluates to is based on a raw pointer, then the
/// result of `addr_of!` inherits all permissions from that raw pointer. However, if the place is
/// based on a reference, local variable, or `static`, then until all details are decided, the same
/// rules as for shared references apply: it is UB to write through a pointer created with this
/// operation, except for bytes located inside an `UnsafeCell`. Use `&raw mut` (or [`addr_of_mut`])
/// to create a raw pointer that definitely permits mutation.
///
/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
/// and points to initialized data. For cases where those requirements do not hold,
Expand Down
Loading