about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-14 02:44:01 +0000
committerbors <bors@rust-lang.org>2024-06-14 02:44:01 +0000
commitbfa098eae0b5667a8cb5bbbe990a2d7e8445571f (patch)
treeccf475d10d0968adfa323ac7f2c610ca92a51966 /library/core/src
parent0ef0dd24510b52da980889546fcd15254dc56a23 (diff)
parent3494ea18186482b9753a00cc7d163151704aa220 (diff)
downloadrust-bfa098eae0b5667a8cb5bbbe990a2d7e8445571f.tar.gz
rust-bfa098eae0b5667a8cb5bbbe990a2d7e8445571f.zip
Auto merge of #126439 - matthiaskrgr:rollup-856xt18, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #123726 (Clarify `Command::new` behavior for programs with arguments)
 - #126088 ([1/2] clean-up / general improvements)
 - #126238 (Fix Miri sysroot for `x run`)
 - #126315 (Add pub struct with allow(dead_code) into worklist)
 - #126360 (Uplift `structural_traits.rs` into the new trait solver)
 - #126371 (Tweak output of import suggestions)
 - #126388 (const-eval: make lint scope computation consistent)
 - #126390 (Fix wording in {checked_}next_power_of_two)
 - #126392 (Small style improvement in `gvn.rs`)
 - #126402 (Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/intrinsics.rs3
-rw-r--r--library/core/src/num/nonzero.rs2
-rw-r--r--library/core/src/num/uint_macros.rs4
-rw-r--r--library/core/src/ops/coroutine.rs2
4 files changed, 6 insertions, 5 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index cd3534ecb12..6b5054a9f06 100644
--- a/library/core/src/intrinsics.rs
+++ b/library/core/src/intrinsics.rs
@@ -3043,8 +3043,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
     unsafe {
         ub_checks::assert_unsafe_precondition!(
             check_language_ub,
-            "ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null \
-            and the specified memory ranges do not overlap",
+            "ptr::copy requires that both pointer arguments are aligned and non-null",
             (
                 src: *const () = src as *const (),
                 dst: *mut () = dst as *mut (),
diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs
index 863f0d61df3..5956a08593a 100644
--- a/library/core/src/num/nonzero.rs
+++ b/library/core/src/num/nonzero.rs
@@ -1059,7 +1059,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
             unsafe { Self::new_unchecked(self.get().unchecked_add(other)) }
         }
 
-        /// Returns the smallest power of two greater than or equal to n.
+        /// Returns the smallest power of two greater than or equal to `self`.
         /// Checks for overflow and returns [`None`]
         /// if the next power of two is greater than the type’s maximum value.
         /// As a consequence, the result cannot wrap to zero.
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index 1491c27372b..cdbd695008e 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -2830,7 +2830,7 @@ macro_rules! uint_impl {
         ///
         /// When return value overflows (i.e., `self > (1 << (N-1))` for type
         /// `uN`), it panics in debug mode and the return value is wrapped to 0 in
-        /// release mode (the only situation in which method can return 0).
+        /// release mode (the only situation in which this method can return 0).
         ///
         /// # Examples
         ///
@@ -2851,7 +2851,7 @@ macro_rules! uint_impl {
             self.one_less_than_next_power_of_two() + 1
         }
 
-        /// Returns the smallest power of two greater than or equal to `n`. If
+        /// Returns the smallest power of two greater than or equal to `self`. If
         /// the next power of two is greater than the type's maximum value,
         /// `None` is returned, otherwise the power of two is wrapped in `Some`.
         ///
diff --git a/library/core/src/ops/coroutine.rs b/library/core/src/ops/coroutine.rs
index 6a6c5db1ab1..753f14c6b85 100644
--- a/library/core/src/ops/coroutine.rs
+++ b/library/core/src/ops/coroutine.rs
@@ -76,6 +76,7 @@ pub trait Coroutine<R = ()> {
     /// values which are allowed to be returned each time a coroutine yields.
     /// For example an iterator-as-a-coroutine would likely have this type as
     /// `T`, the type being iterated over.
+    #[cfg_attr(not(bootstrap), lang = "coroutine_yield")]
     type Yield;
 
     /// The type of value this coroutine returns.
@@ -84,6 +85,7 @@ pub trait Coroutine<R = ()> {
     /// `return` statement or implicitly as the last expression of a coroutine
     /// literal. For example futures would use this as `Result<T, E>` as it
     /// represents a completed future.
+    #[cfg_attr(not(bootstrap), lang = "coroutine_return")]
     type Return;
 
     /// Resumes the execution of this coroutine.