Skip to content

Commit 796ae33

Browse files
committed
Auto merge of rust-lang#130091 - matthiaskrgr:rollup-kalu1cs, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - rust-lang#126452 (Implement raw lifetimes and labels (`'r#ident`)) - rust-lang#129555 (stabilize const_float_bits_conv) - rust-lang#129594 (explain the options bootstrap passes to curl) - rust-lang#129677 (Don't build by-move body when async closure is tainted) - rust-lang#129847 (Do not call query to compute coroutine layout for synthetic body of async closure) - rust-lang#129869 (add a few more crashtests) - rust-lang#130009 (rustdoc-search: allow trailing `Foo ->` arg search) - rust-lang#130046 (str: make as_mut_ptr and as_bytes_mut unstably const) - rust-lang#130047 (Win: Add dbghelp to the list of import libraries) - rust-lang#130059 (Remove the unused `llvm-skip-rebuild` option from x.py) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4f47132 + 64afc03 commit 796ae33

File tree

7 files changed

+39
-35
lines changed

7 files changed

+39
-35
lines changed

core/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
#![feature(const_cell_into_inner)]
122122
#![feature(const_eval_select)]
123123
#![feature(const_exact_div)]
124-
#![feature(const_float_bits_conv)]
125124
#![feature(const_float_classify)]
126125
#![feature(const_fmt_arguments_new)]
127126
#![feature(const_hash)]
@@ -165,6 +164,8 @@
165164
#![feature(coverage_attribute)]
166165
#![feature(do_not_recommend)]
167166
#![feature(duration_consts_float)]
167+
#![feature(f128_const)]
168+
#![feature(f16_const)]
168169
#![feature(internal_impls_macro)]
169170
#![feature(ip)]
170171
#![feature(is_ascii_octdigit)]

core/src/num/f128.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ impl f128 {
914914
/// ```
915915
#[inline]
916916
#[unstable(feature = "f128", issue = "116909")]
917-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
917+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
918918
#[must_use = "this returns the result of the operation, without modifying the original"]
919919
pub const fn to_bits(self) -> u128 {
920920
// SAFETY: `u128` is a plain old datatype so we can always transmute to it.
@@ -963,7 +963,7 @@ impl f128 {
963963
#[inline]
964964
#[must_use]
965965
#[unstable(feature = "f128", issue = "116909")]
966-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
966+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
967967
pub const fn from_bits(v: u128) -> Self {
968968
// It turns out the safety issues with sNaN were overblown! Hooray!
969969
// SAFETY: `u128` is a plain old datatype so we can always transmute from it.
@@ -990,7 +990,7 @@ impl f128 {
990990
/// ```
991991
#[inline]
992992
#[unstable(feature = "f128", issue = "116909")]
993-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
993+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
994994
#[must_use = "this returns the result of the operation, without modifying the original"]
995995
pub const fn to_be_bytes(self) -> [u8; 16] {
996996
self.to_bits().to_be_bytes()
@@ -1016,7 +1016,7 @@ impl f128 {
10161016
/// ```
10171017
#[inline]
10181018
#[unstable(feature = "f128", issue = "116909")]
1019-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1019+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
10201020
#[must_use = "this returns the result of the operation, without modifying the original"]
10211021
pub const fn to_le_bytes(self) -> [u8; 16] {
10221022
self.to_bits().to_le_bytes()
@@ -1053,7 +1053,7 @@ impl f128 {
10531053
/// ```
10541054
#[inline]
10551055
#[unstable(feature = "f128", issue = "116909")]
1056-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1056+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
10571057
#[must_use = "this returns the result of the operation, without modifying the original"]
10581058
pub const fn to_ne_bytes(self) -> [u8; 16] {
10591059
self.to_bits().to_ne_bytes()
@@ -1081,7 +1081,7 @@ impl f128 {
10811081
#[inline]
10821082
#[must_use]
10831083
#[unstable(feature = "f128", issue = "116909")]
1084-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1084+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
10851085
pub const fn from_be_bytes(bytes: [u8; 16]) -> Self {
10861086
Self::from_bits(u128::from_be_bytes(bytes))
10871087
}
@@ -1108,7 +1108,7 @@ impl f128 {
11081108
#[inline]
11091109
#[must_use]
11101110
#[unstable(feature = "f128", issue = "116909")]
1111-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1111+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
11121112
pub const fn from_le_bytes(bytes: [u8; 16]) -> Self {
11131113
Self::from_bits(u128::from_le_bytes(bytes))
11141114
}
@@ -1145,7 +1145,7 @@ impl f128 {
11451145
#[inline]
11461146
#[must_use]
11471147
#[unstable(feature = "f128", issue = "116909")]
1148-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1148+
#[rustc_const_unstable(feature = "f128_const", issue = "116909")]
11491149
pub const fn from_ne_bytes(bytes: [u8; 16]) -> Self {
11501150
Self::from_bits(u128::from_ne_bytes(bytes))
11511151
}

core/src/num/f16.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ impl f16 {
925925
/// ```
926926
#[inline]
927927
#[unstable(feature = "f16", issue = "116909")]
928-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
928+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
929929
#[must_use = "this returns the result of the operation, without modifying the original"]
930930
pub const fn to_bits(self) -> u16 {
931931
// SAFETY: `u16` is a plain old datatype so we can always transmute to it.
@@ -973,7 +973,7 @@ impl f16 {
973973
#[inline]
974974
#[must_use]
975975
#[unstable(feature = "f16", issue = "116909")]
976-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
976+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
977977
pub const fn from_bits(v: u16) -> Self {
978978
// It turns out the safety issues with sNaN were overblown! Hooray!
979979
// SAFETY: `u16` is a plain old datatype so we can always transmute from it.
@@ -999,7 +999,7 @@ impl f16 {
999999
/// ```
10001000
#[inline]
10011001
#[unstable(feature = "f16", issue = "116909")]
1002-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1002+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
10031003
#[must_use = "this returns the result of the operation, without modifying the original"]
10041004
pub const fn to_be_bytes(self) -> [u8; 2] {
10051005
self.to_bits().to_be_bytes()
@@ -1024,7 +1024,7 @@ impl f16 {
10241024
/// ```
10251025
#[inline]
10261026
#[unstable(feature = "f16", issue = "116909")]
1027-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1027+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
10281028
#[must_use = "this returns the result of the operation, without modifying the original"]
10291029
pub const fn to_le_bytes(self) -> [u8; 2] {
10301030
self.to_bits().to_le_bytes()
@@ -1062,7 +1062,7 @@ impl f16 {
10621062
/// ```
10631063
#[inline]
10641064
#[unstable(feature = "f16", issue = "116909")]
1065-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1065+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
10661066
#[must_use = "this returns the result of the operation, without modifying the original"]
10671067
pub const fn to_ne_bytes(self) -> [u8; 2] {
10681068
self.to_bits().to_ne_bytes()
@@ -1086,7 +1086,7 @@ impl f16 {
10861086
#[inline]
10871087
#[must_use]
10881088
#[unstable(feature = "f16", issue = "116909")]
1089-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1089+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
10901090
pub const fn from_be_bytes(bytes: [u8; 2]) -> Self {
10911091
Self::from_bits(u16::from_be_bytes(bytes))
10921092
}
@@ -1109,7 +1109,7 @@ impl f16 {
11091109
#[inline]
11101110
#[must_use]
11111111
#[unstable(feature = "f16", issue = "116909")]
1112-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1112+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
11131113
pub const fn from_le_bytes(bytes: [u8; 2]) -> Self {
11141114
Self::from_bits(u16::from_le_bytes(bytes))
11151115
}
@@ -1143,7 +1143,7 @@ impl f16 {
11431143
#[inline]
11441144
#[must_use]
11451145
#[unstable(feature = "f16", issue = "116909")]
1146-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1146+
#[rustc_const_unstable(feature = "f16_const", issue = "116909")]
11471147
pub const fn from_ne_bytes(bytes: [u8; 2]) -> Self {
11481148
Self::from_bits(u16::from_ne_bytes(bytes))
11491149
}

core/src/num/f32.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ impl f32 {
11151115
#[must_use = "this returns the result of the operation, \
11161116
without modifying the original"]
11171117
#[stable(feature = "float_bits_conv", since = "1.20.0")]
1118-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1118+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11191119
#[inline]
11201120
pub const fn to_bits(self) -> u32 {
11211121
// SAFETY: `u32` is a plain old datatype so we can always transmute to it.
@@ -1159,7 +1159,7 @@ impl f32 {
11591159
/// assert_eq!(v, 12.5);
11601160
/// ```
11611161
#[stable(feature = "float_bits_conv", since = "1.20.0")]
1162-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1162+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11631163
#[must_use]
11641164
#[inline]
11651165
pub const fn from_bits(v: u32) -> Self {
@@ -1183,7 +1183,7 @@ impl f32 {
11831183
#[must_use = "this returns the result of the operation, \
11841184
without modifying the original"]
11851185
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1186-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1186+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11871187
#[inline]
11881188
pub const fn to_be_bytes(self) -> [u8; 4] {
11891189
self.to_bits().to_be_bytes()
@@ -1204,7 +1204,7 @@ impl f32 {
12041204
#[must_use = "this returns the result of the operation, \
12051205
without modifying the original"]
12061206
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1207-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1207+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12081208
#[inline]
12091209
pub const fn to_le_bytes(self) -> [u8; 4] {
12101210
self.to_bits().to_le_bytes()
@@ -1238,7 +1238,7 @@ impl f32 {
12381238
#[must_use = "this returns the result of the operation, \
12391239
without modifying the original"]
12401240
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1241-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1241+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12421242
#[inline]
12431243
pub const fn to_ne_bytes(self) -> [u8; 4] {
12441244
self.to_bits().to_ne_bytes()
@@ -1256,7 +1256,7 @@ impl f32 {
12561256
/// assert_eq!(value, 12.5);
12571257
/// ```
12581258
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1259-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1259+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12601260
#[must_use]
12611261
#[inline]
12621262
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self {
@@ -1275,7 +1275,7 @@ impl f32 {
12751275
/// assert_eq!(value, 12.5);
12761276
/// ```
12771277
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1278-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1278+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12791279
#[must_use]
12801280
#[inline]
12811281
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self {
@@ -1305,7 +1305,7 @@ impl f32 {
13051305
/// assert_eq!(value, 12.5);
13061306
/// ```
13071307
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1308-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1308+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
13091309
#[must_use]
13101310
#[inline]
13111311
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self {

core/src/num/f64.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ impl f64 {
11111111
#[must_use = "this returns the result of the operation, \
11121112
without modifying the original"]
11131113
#[stable(feature = "float_bits_conv", since = "1.20.0")]
1114-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1114+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11151115
#[inline]
11161116
pub const fn to_bits(self) -> u64 {
11171117
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
@@ -1155,7 +1155,7 @@ impl f64 {
11551155
/// assert_eq!(v, 12.5);
11561156
/// ```
11571157
#[stable(feature = "float_bits_conv", since = "1.20.0")]
1158-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1158+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11591159
#[must_use]
11601160
#[inline]
11611161
pub const fn from_bits(v: u64) -> Self {
@@ -1179,7 +1179,7 @@ impl f64 {
11791179
#[must_use = "this returns the result of the operation, \
11801180
without modifying the original"]
11811181
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1182-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1182+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
11831183
#[inline]
11841184
pub const fn to_be_bytes(self) -> [u8; 8] {
11851185
self.to_bits().to_be_bytes()
@@ -1200,7 +1200,7 @@ impl f64 {
12001200
#[must_use = "this returns the result of the operation, \
12011201
without modifying the original"]
12021202
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1203-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1203+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12041204
#[inline]
12051205
pub const fn to_le_bytes(self) -> [u8; 8] {
12061206
self.to_bits().to_le_bytes()
@@ -1234,7 +1234,7 @@ impl f64 {
12341234
#[must_use = "this returns the result of the operation, \
12351235
without modifying the original"]
12361236
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1237-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1237+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12381238
#[inline]
12391239
pub const fn to_ne_bytes(self) -> [u8; 8] {
12401240
self.to_bits().to_ne_bytes()
@@ -1252,7 +1252,7 @@ impl f64 {
12521252
/// assert_eq!(value, 12.5);
12531253
/// ```
12541254
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1255-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1255+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12561256
#[must_use]
12571257
#[inline]
12581258
pub const fn from_be_bytes(bytes: [u8; 8]) -> Self {
@@ -1271,7 +1271,7 @@ impl f64 {
12711271
/// assert_eq!(value, 12.5);
12721272
/// ```
12731273
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1274-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1274+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
12751275
#[must_use]
12761276
#[inline]
12771277
pub const fn from_le_bytes(bytes: [u8; 8]) -> Self {
@@ -1301,7 +1301,7 @@ impl f64 {
13011301
/// assert_eq!(value, 12.5);
13021302
/// ```
13031303
#[stable(feature = "float_to_from_bytes", since = "1.40.0")]
1304-
#[rustc_const_unstable(feature = "const_float_bits_conv", issue = "72447")]
1304+
#[rustc_const_stable(feature = "const_float_bits_conv", since = "CURRENT_RUSTC_VERSION")]
13051305
#[must_use]
13061306
#[inline]
13071307
pub const fn from_ne_bytes(bytes: [u8; 8]) -> Self {

core/src/str/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ impl str {
338338
/// assert_eq!("🍔∈🌏", s);
339339
/// ```
340340
#[stable(feature = "str_mut_extras", since = "1.20.0")]
341+
#[rustc_const_unstable(feature = "const_str_as_mut", issue = "130086")]
341342
#[must_use]
342343
#[inline(always)]
343-
pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
344+
pub const unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
344345
// SAFETY: the cast from `&str` to `&[u8]` is safe since `str`
345346
// has the same layout as `&[u8]` (only std can make this guarantee).
346347
// The pointer dereference is safe since it comes from a mutable reference which
@@ -383,10 +384,11 @@ impl str {
383384
/// It is your responsibility to make sure that the string slice only gets
384385
/// modified in a way that it remains valid UTF-8.
385386
#[stable(feature = "str_as_mut_ptr", since = "1.36.0")]
387+
#[rustc_const_unstable(feature = "const_str_as_mut", issue = "130086")]
386388
#[rustc_never_returns_null_ptr]
387389
#[must_use]
388390
#[inline(always)]
389-
pub fn as_mut_ptr(&mut self) -> *mut u8 {
391+
pub const fn as_mut_ptr(&mut self) -> *mut u8 {
390392
self as *mut str as *mut u8
391393
}
392394

windows_targets/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ pub macro link {
3838
#[link(name = "ntdll")]
3939
#[link(name = "userenv")]
4040
#[link(name = "ws2_32")]
41+
#[link(name = "dbghelp")] // required for backtrace-rs symbolization
4142
extern "C" {}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy