Skip to content

Commit 0e6a8cd

Browse files
committed
Auto merge of rust-lang#125423 - fmease:rollup-ne4l9y4, r=fmease
Rollup of 7 pull requests Successful merges: - rust-lang#125043 (reference type safety invariant docs: clarification) - rust-lang#125306 (Force the inner coroutine of an async closure to `move` if the outer closure is `move` and `FnOnce`) - rust-lang#125355 (Use Backtrace::force_capture instead of Backtrace::capture in rustc_log) - rust-lang#125382 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 7)) - rust-lang#125391 (Minor serialize/span tweaks) - rust-lang#125395 (Remove unnecessary `.md` from the documentation sidebar) - rust-lang#125399 (Stop using `to_hir_binop` in codegen) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2d5dc61 + b5a5583 commit 0e6a8cd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

core/src/primitive_docs.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -1476,14 +1476,17 @@ mod prim_usize {}
14761476
///
14771477
/// For instance, this means that unsafe code in a safe function may assume these invariants are
14781478
/// ensured of arguments passed by the caller, and it may assume that these invariants are ensured
1479-
/// of return values from any safe functions it calls. In most cases, the inverse is also true:
1480-
/// unsafe code must not violate these invariants when passing arguments to safe functions or
1481-
/// returning values from safe functions; such violations may result in undefined behavior. Where
1482-
/// exceptions to this latter requirement exist, they will be called out explicitly in documentation.
1479+
/// of return values from any safe functions it calls.
1480+
///
1481+
/// For the other direction, things are more complicated: when unsafe code passes arguments
1482+
/// to safe functions or returns values from safe functions, they generally must *at least*
1483+
/// not violate these invariants. The full requirements are stronger, as the reference generally
1484+
/// must point to data that is safe to use at type `T`.
14831485
///
14841486
/// It is not decided yet whether unsafe code may violate these invariants temporarily on internal
14851487
/// data. As a consequence, unsafe code which violates these invariants temporarily on internal data
1486-
/// may become unsound in future versions of Rust depending on how this question is decided.
1488+
/// may be unsound or become unsound in future versions of Rust depending on how this question is
1489+
/// decided.
14871490
///
14881491
/// [allocated object]: ptr#allocated-object
14891492
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)