about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-13 01:00:17 +0000
committerbors <bors@rust-lang.org>2024-11-13 01:00:17 +0000
commit242f20dc1e95ca8def0ff436d7c844811ae7ac25 (patch)
treea9fa164ffed7bd2076109efa63e9d21c12ea706e /library/core
parentb420d923cff05f51eb43f607f5d8dce827eeba97 (diff)
parentd83de7e0c59efeea72088e732f554639276d6f4b (diff)
downloadrust-242f20dc1e95ca8def0ff436d7c844811ae7ac25.tar.gz
rust-242f20dc1e95ca8def0ff436d7c844811ae7ac25.zip
Auto merge of #132972 - matthiaskrgr:rollup-456osr7, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #132702 (CFI: Append debug location to CFI blocks)
 - #132851 (Update the doc comment of `ASCII_CASE_MASK`)
 - #132948 (stabilize const_unicode_case_lookup)
 - #132950 (Use GNU ld on m68k-unknown-linux-gnu)
 - #132962 (triagebot: add codegen reviewers)
 - #132966 (stabilize const_option_ext)
 - #132970 (Add tracking issue number to unsigned_nonzero_div_ceil feature)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core')
-rw-r--r--library/core/src/char/methods.rs6
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/core/src/num/mod.rs2
-rw-r--r--library/core/src/num/nonzero.rs2
-rw-r--r--library/core/src/option.rs8
-rw-r--r--library/core/src/unicode/unicode_data.rs3
-rw-r--r--library/core/tests/lib.rs1
7 files changed, 11 insertions, 13 deletions
diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs
index 02cc0f9d770..6e79e79c143 100644
--- a/library/core/src/char/methods.rs
+++ b/library/core/src/char/methods.rs
@@ -775,13 +775,12 @@ impl char {
     /// In a const context:
     ///
     /// ```
-    /// #![feature(const_unicode_case_lookup)]
     /// const CAPITAL_DELTA_IS_LOWERCASE: bool = 'Δ'.is_lowercase();
     /// assert!(!CAPITAL_DELTA_IS_LOWERCASE);
     /// ```
     #[must_use]
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
+    #[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")]
     #[inline]
     pub const fn is_lowercase(self) -> bool {
         match self {
@@ -817,13 +816,12 @@ impl char {
     /// In a const context:
     ///
     /// ```
-    /// #![feature(const_unicode_case_lookup)]
     /// const CAPITAL_DELTA_IS_UPPERCASE: bool = 'Δ'.is_uppercase();
     /// assert!(CAPITAL_DELTA_IS_UPPERCASE);
     /// ```
     #[must_use]
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
+    #[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")]
     #[inline]
     pub const fn is_uppercase(self) -> bool {
         match self {
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 2f4f33dcc85..6f7ea769420 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -120,7 +120,6 @@
 #![feature(const_float_methods)]
 #![feature(const_heap)]
 #![feature(const_nonnull_new)]
-#![feature(const_option_ext)]
 #![feature(const_pin_2)]
 #![feature(const_ptr_is_null)]
 #![feature(const_ptr_sub_ptr)]
@@ -134,7 +133,6 @@
 #![feature(const_type_name)]
 #![feature(const_typed_swap)]
 #![feature(const_ub_checks)]
-#![feature(const_unicode_case_lookup)]
 #![feature(core_intrinsics)]
 #![feature(coverage_attribute)]
 #![feature(do_not_recommend)]
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs
index 61beedfcd5d..9d9897b9cf0 100644
--- a/library/core/src/num/mod.rs
+++ b/library/core/src/num/mod.rs
@@ -528,7 +528,7 @@ impl isize {
     midpoint_impl! { isize, signed }
 }
 
-/// If the 6th bit is set ascii is lower case.
+/// If the bit selected by this mask is set, ascii is lower case.
 const ASCII_CASE_MASK: u8 = 0b0010_0000;
 
 impl u8 {
diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs
index c7eb9d0f3fd..b883a0c2ec7 100644
--- a/library/core/src/num/nonzero.rs
+++ b/library/core/src/num/nonzero.rs
@@ -1233,7 +1233,7 @@ macro_rules! nonzero_integer_signedness_dependent_impls {
             #[doc = concat!("let three = NonZero::new(3", stringify!($Int), ").unwrap();")]
             /// assert_eq!(three.div_ceil(two), two);
             /// ```
-            #[unstable(feature = "unsigned_nonzero_div_ceil", issue = "none")]
+            #[unstable(feature = "unsigned_nonzero_div_ceil", issue = "132968")]
             #[must_use = "this returns the result of the operation, \
                           without modifying the original"]
             #[inline]
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 46187938622..29d1956af95 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -738,7 +738,7 @@ impl<T> Option<T> {
     #[inline]
     #[must_use]
     #[stable(feature = "pin", since = "1.33.0")]
-    #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
+    #[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
     pub const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&T>> {
         // FIXME(const-hack): use `map` once that is possible
         match Pin::get_ref(self).as_ref() {
@@ -755,7 +755,7 @@ impl<T> Option<T> {
     #[inline]
     #[must_use]
     #[stable(feature = "pin", since = "1.33.0")]
-    #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
+    #[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
     pub const fn as_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut T>> {
         // SAFETY: `get_unchecked_mut` is never used to move the `Option` inside `self`.
         // `x` is guaranteed to be pinned because it comes from `self` which is pinned.
@@ -802,7 +802,7 @@ impl<T> Option<T> {
     #[inline]
     #[must_use]
     #[stable(feature = "option_as_slice", since = "1.75.0")]
-    #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
+    #[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
     pub const fn as_slice(&self) -> &[T] {
         // SAFETY: When the `Option` is `Some`, we're using the actual pointer
         // to the payload, with a length of 1, so this is equivalent to
@@ -857,7 +857,7 @@ impl<T> Option<T> {
     #[inline]
     #[must_use]
     #[stable(feature = "option_as_slice", since = "1.75.0")]
-    #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
+    #[rustc_const_stable(feature = "const_option_ext", since = "CURRENT_RUSTC_VERSION")]
     pub const fn as_mut_slice(&mut self) -> &mut [T] {
         // SAFETY: When the `Option` is `Some`, we're using the actual pointer
         // to the payload, with a length of 1, so this is equivalent to
diff --git a/library/core/src/unicode/unicode_data.rs b/library/core/src/unicode/unicode_data.rs
index 4655d35e9c4..7f4826402eb 100644
--- a/library/core/src/unicode/unicode_data.rs
+++ b/library/core/src/unicode/unicode_data.rs
@@ -1,6 +1,7 @@
 ///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!
 
 #[inline(always)]
+#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
 const fn bitset_search<
     const N: usize,
     const CHUNK_SIZE: usize,
@@ -423,6 +424,7 @@ pub mod lowercase {
         (5, 187), (6, 78), (7, 132),
     ];
 
+    #[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
     pub const fn lookup(c: char) -> bool {
         super::bitset_search(
             c as u32,
@@ -547,6 +549,7 @@ pub mod uppercase {
         (2, 146), (2, 20), (3, 146), (3, 140), (3, 134), (4, 178), (4, 171),
     ];
 
+    #[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
     pub const fn lookup(c: char) -> bool {
         super::bitset_search(
             c as u32,
diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs
index b9706ea2a9e..f515e9e4109 100644
--- a/library/core/tests/lib.rs
+++ b/library/core/tests/lib.rs
@@ -21,7 +21,6 @@
 #![feature(const_eval_select)]
 #![feature(const_heap)]
 #![feature(const_nonnull_new)]
-#![feature(const_option_ext)]
 #![feature(const_pin_2)]
 #![feature(const_trait_impl)]
 #![feature(core_intrinsics)]