Skip to content

Commit 4facebe

Browse files
committed
Fix feature gate
1 parent 223aced commit 4facebe

File tree

20 files changed

+74
-72
lines changed

20 files changed

+74
-72
lines changed

library/core/src/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl Error for TryFromSliceError {
198198
}
199199

200200
#[stable(feature = "try_from_slice_error", since = "1.36.0")]
201-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
201+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
202202
impl const From<Infallible> for TryFromSliceError {
203203
fn from(x: Infallible) -> TryFromSliceError {
204204
match x {}

library/core/src/ascii/ascii_char.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ macro_rules! into_int_impl {
546546
($($ty:ty)*) => {
547547
$(
548548
#[unstable(feature = "ascii_char", issue = "110998")]
549-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
549+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
550550
impl const From<AsciiChar> for $ty {
551551
#[inline]
552552
fn from(chr: AsciiChar) -> $ty {

library/core/src/char/convert.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
3636
}
3737

3838
#[stable(feature = "char_convert", since = "1.13.0")]
39-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
39+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
4040
impl const From<char> for u32 {
4141
/// Converts a [`char`] into a [`u32`].
4242
///
@@ -54,7 +54,7 @@ impl const From<char> for u32 {
5454
}
5555

5656
#[stable(feature = "more_char_conversions", since = "1.51.0")]
57-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
57+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
5858
impl const From<char> for u64 {
5959
/// Converts a [`char`] into a [`u64`].
6060
///
@@ -74,7 +74,7 @@ impl const From<char> for u64 {
7474
}
7575

7676
#[stable(feature = "more_char_conversions", since = "1.51.0")]
77-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
77+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
7878
impl const From<char> for u128 {
7979
/// Converts a [`char`] into a [`u128`].
8080
///
@@ -160,7 +160,7 @@ impl TryFrom<char> for u16 {
160160
/// for a superset of Windows-1252 that fills the remaining blanks with corresponding
161161
/// C0 and C1 control codes.
162162
#[stable(feature = "char_convert", since = "1.13.0")]
163-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
163+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
164164
impl const From<u8> for char {
165165
/// Converts a [`u8`] into a [`char`].
166166
///
@@ -251,7 +251,7 @@ const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
251251
}
252252

253253
#[stable(feature = "try_from", since = "1.34.0")]
254-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
254+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
255255
impl const TryFrom<u32> for char {
256256
type Error = CharTryFromError;
257257

library/core/src/convert/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub const fn identity<T>(x: T) -> T {
217217
#[stable(feature = "rust1", since = "1.0.0")]
218218
#[rustc_diagnostic_item = "AsRef"]
219219
#[const_trait]
220-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
220+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
221221
pub trait AsRef<T: PointeeSized>: PointeeSized {
222222
/// Converts this type into a shared reference of the (usually inferred) input type.
223223
#[stable(feature = "rust1", since = "1.0.0")]
@@ -370,7 +370,7 @@ pub trait AsRef<T: PointeeSized>: PointeeSized {
370370
#[stable(feature = "rust1", since = "1.0.0")]
371371
#[rustc_diagnostic_item = "AsMut"]
372372
#[const_trait]
373-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
373+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
374374
pub trait AsMut<T: PointeeSized>: PointeeSized {
375375
/// Converts this type into a mutable reference of the (usually inferred) input type.
376376
#[stable(feature = "rust1", since = "1.0.0")]
@@ -714,7 +714,7 @@ pub trait TryFrom<T>: Sized {
714714

715715
// As lifts over &
716716
#[stable(feature = "rust1", since = "1.0.0")]
717-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
717+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
718718
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &T
719719
where
720720
T: ~const AsRef<U>,
@@ -727,7 +727,7 @@ where
727727

728728
// As lifts over &mut
729729
#[stable(feature = "rust1", since = "1.0.0")]
730-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
730+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
731731
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &mut T
732732
where
733733
T: ~const AsRef<U>,
@@ -748,7 +748,7 @@ where
748748

749749
// AsMut lifts over &mut
750750
#[stable(feature = "rust1", since = "1.0.0")]
751-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
751+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
752752
impl<T: PointeeSized, U: PointeeSized> const AsMut<U> for &mut T
753753
where
754754
T: ~const AsMut<U>,
@@ -847,7 +847,7 @@ where
847847
////////////////////////////////////////////////////////////////////////////////
848848

849849
#[stable(feature = "rust1", since = "1.0.0")]
850-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
850+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
851851
impl<T> const AsRef<[T]> for [T] {
852852
#[inline(always)]
853853
fn as_ref(&self) -> &[T] {
@@ -856,7 +856,7 @@ impl<T> const AsRef<[T]> for [T] {
856856
}
857857

858858
#[stable(feature = "rust1", since = "1.0.0")]
859-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
859+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
860860
impl<T> const AsMut<[T]> for [T] {
861861
#[inline(always)]
862862
fn as_mut(&mut self) -> &mut [T] {
@@ -865,7 +865,7 @@ impl<T> const AsMut<[T]> for [T] {
865865
}
866866

867867
#[stable(feature = "rust1", since = "1.0.0")]
868-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
868+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
869869
impl const AsRef<str> for str {
870870
#[inline(always)]
871871
fn as_ref(&self) -> &str {
@@ -874,7 +874,7 @@ impl const AsRef<str> for str {
874874
}
875875

876876
#[stable(feature = "as_mut_str_for_str", since = "1.51.0")]
877-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
877+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
878878
impl const AsMut<str> for str {
879879
#[inline(always)]
880880
fn as_mut(&mut self) -> &mut str {
@@ -936,7 +936,7 @@ impl const AsMut<str> for str {
936936
pub enum Infallible {}
937937

938938
#[stable(feature = "convert_infallible", since = "1.34.0")]
939-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
939+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
940940
impl const Clone for Infallible {
941941
fn clone(&self) -> Infallible {
942942
match *self {}
@@ -990,7 +990,7 @@ impl Ord for Infallible {
990990
}
991991

992992
#[stable(feature = "convert_infallible", since = "1.34.0")]
993-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
993+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
994994
impl const From<!> for Infallible {
995995
#[inline]
996996
fn from(x: !) -> Self {

library/core/src/convert/num.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ macro_rules! impl_from {
6969
};
7070
($Small:ty => $Large:ty, #[$attr:meta], $doc:expr $(,)?) => {
7171
#[$attr]
72-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
72+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
7373
impl const From<$Small> for $Large {
7474
// Rustdocs on the impl block show a "[+] show undocumented items" toggle.
7575
// Rustdocs on functions do not.
@@ -201,7 +201,7 @@ macro_rules! impl_float_from_bool {
201201
)?
202202
) => {
203203
#[stable(feature = "float_from_bool", since = "1.68.0")]
204-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
204+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
205205
impl const From<bool> for $float {
206206
#[doc = concat!("Converts a [`bool`] to [`", stringify!($float),"`] losslessly.")]
207207
/// The resulting value is positive `0.0` for `false` and `1.0` for `true` values.
@@ -252,7 +252,7 @@ impl_float_from_bool!(
252252
macro_rules! impl_try_from_unbounded {
253253
($source:ty => $($target:ty),+) => {$(
254254
#[stable(feature = "try_from", since = "1.34.0")]
255-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
255+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
256256
impl const TryFrom<$source> for $target {
257257
type Error = TryFromIntError;
258258

@@ -271,7 +271,7 @@ macro_rules! impl_try_from_unbounded {
271271
macro_rules! impl_try_from_lower_bounded {
272272
($source:ty => $($target:ty),+) => {$(
273273
#[stable(feature = "try_from", since = "1.34.0")]
274-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
274+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
275275
impl const TryFrom<$source> for $target {
276276
type Error = TryFromIntError;
277277

@@ -294,7 +294,7 @@ macro_rules! impl_try_from_lower_bounded {
294294
macro_rules! impl_try_from_upper_bounded {
295295
($source:ty => $($target:ty),+) => {$(
296296
#[stable(feature = "try_from", since = "1.34.0")]
297-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
297+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
298298
impl const TryFrom<$source> for $target {
299299
type Error = TryFromIntError;
300300

@@ -317,7 +317,7 @@ macro_rules! impl_try_from_upper_bounded {
317317
macro_rules! impl_try_from_both_bounded {
318318
($source:ty => $($target:ty),+) => {$(
319319
#[stable(feature = "try_from", since = "1.34.0")]
320-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
320+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
321321
impl const TryFrom<$source> for $target {
322322
type Error = TryFromIntError;
323323

@@ -456,7 +456,7 @@ use crate::num::NonZero;
456456
macro_rules! impl_nonzero_int_from_nonzero_int {
457457
($Small:ty => $Large:ty) => {
458458
#[stable(feature = "nz_int_conv", since = "1.41.0")]
459-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
459+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
460460
impl const From<NonZero<$Small>> for NonZero<$Large> {
461461
// Rustdocs on the impl block show a "[+] show undocumented items" toggle.
462462
// Rustdocs on functions do not.
@@ -547,7 +547,7 @@ impl_nonzero_int_try_from_int!(isize);
547547
macro_rules! impl_nonzero_int_try_from_nonzero_int {
548548
($source:ty => $($target:ty),+) => {$(
549549
#[stable(feature = "nzint_try_from_nzint_conv", since = "1.49.0")]
550-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
550+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
551551
impl const TryFrom<NonZero<$source>> for NonZero<$target> {
552552
type Error = TryFromIntError;
553553

library/core/src/net/ip_addr.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ impl fmt::Debug for IpAddr {
10891089
}
10901090

10911091
#[stable(feature = "ip_from_ip", since = "1.16.0")]
1092-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1092+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
10931093
impl const From<Ipv4Addr> for IpAddr {
10941094
/// Copies this address to a new `IpAddr::V4`.
10951095
///
@@ -1112,7 +1112,7 @@ impl const From<Ipv4Addr> for IpAddr {
11121112
}
11131113

11141114
#[stable(feature = "ip_from_ip", since = "1.16.0")]
1115-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1115+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
11161116
impl const From<Ipv6Addr> for IpAddr {
11171117
/// Copies this address to a new `IpAddr::V6`.
11181118
///
@@ -1223,7 +1223,7 @@ impl Ord for Ipv4Addr {
12231223
}
12241224

12251225
#[stable(feature = "ip_u32", since = "1.1.0")]
1226-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1226+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
12271227
impl const From<Ipv4Addr> for u32 {
12281228
/// Uses [`Ipv4Addr::to_bits`] to convert an IPv4 address to a host byte order `u32`.
12291229
#[inline]
@@ -1233,7 +1233,7 @@ impl const From<Ipv4Addr> for u32 {
12331233
}
12341234

12351235
#[stable(feature = "ip_u32", since = "1.1.0")]
1236-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1236+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
12371237
impl const From<u32> for Ipv4Addr {
12381238
/// Uses [`Ipv4Addr::from_bits`] to convert a host byte order `u32` into an IPv4 address.
12391239
#[inline]
@@ -1243,7 +1243,7 @@ impl const From<u32> for Ipv4Addr {
12431243
}
12441244

12451245
#[stable(feature = "from_slice_v4", since = "1.9.0")]
1246-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1246+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
12471247
impl const From<[u8; 4]> for Ipv4Addr {
12481248
/// Creates an `Ipv4Addr` from a four element byte array.
12491249
///
@@ -1262,7 +1262,7 @@ impl const From<[u8; 4]> for Ipv4Addr {
12621262
}
12631263

12641264
#[stable(feature = "ip_from_slice", since = "1.17.0")]
1265-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1265+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
12661266
impl const From<[u8; 4]> for IpAddr {
12671267
/// Creates an `IpAddr::V4` from a four element byte array.
12681268
///
@@ -2217,7 +2217,7 @@ impl Ord for Ipv6Addr {
22172217
}
22182218

22192219
#[stable(feature = "i128", since = "1.26.0")]
2220-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2220+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
22212221
impl const From<Ipv6Addr> for u128 {
22222222
/// Uses [`Ipv6Addr::to_bits`] to convert an IPv6 address to a host byte order `u128`.
22232223
#[inline]
@@ -2226,7 +2226,7 @@ impl const From<Ipv6Addr> for u128 {
22262226
}
22272227
}
22282228
#[stable(feature = "i128", since = "1.26.0")]
2229-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2229+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
22302230
impl const From<u128> for Ipv6Addr {
22312231
/// Uses [`Ipv6Addr::from_bits`] to convert a host byte order `u128` to an IPv6 address.
22322232
#[inline]
@@ -2236,7 +2236,7 @@ impl const From<u128> for Ipv6Addr {
22362236
}
22372237

22382238
#[stable(feature = "ipv6_from_octets", since = "1.9.0")]
2239-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2239+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
22402240
impl const From<[u8; 16]> for Ipv6Addr {
22412241
/// Creates an `Ipv6Addr` from a sixteen element byte array.
22422242
///
@@ -2264,7 +2264,7 @@ impl const From<[u8; 16]> for Ipv6Addr {
22642264
}
22652265

22662266
#[stable(feature = "ipv6_from_segments", since = "1.16.0")]
2267-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2267+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
22682268
impl const From<[u16; 8]> for Ipv6Addr {
22692269
/// Creates an `Ipv6Addr` from an eight element 16-bit array.
22702270
///
@@ -2293,7 +2293,7 @@ impl const From<[u16; 8]> for Ipv6Addr {
22932293
}
22942294

22952295
#[stable(feature = "ip_from_slice", since = "1.17.0")]
2296-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2296+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
22972297
impl const From<[u8; 16]> for IpAddr {
22982298
/// Creates an `IpAddr::V6` from a sixteen element byte array.
22992299
///
@@ -2321,7 +2321,7 @@ impl const From<[u8; 16]> for IpAddr {
23212321
}
23222322

23232323
#[stable(feature = "ip_from_slice", since = "1.17.0")]
2324-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
2324+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
23252325
impl const From<[u16; 8]> for IpAddr {
23262326
/// Creates an `IpAddr::V6` from an eight element 16-bit array.
23272327
///

library/core/src/net/socket_addr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ impl SocketAddrV6 {
593593
}
594594

595595
#[stable(feature = "ip_from_ip", since = "1.16.0")]
596-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
596+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
597597
impl const From<SocketAddrV4> for SocketAddr {
598598
/// Converts a [`SocketAddrV4`] into a [`SocketAddr::V4`].
599599
#[inline]
@@ -603,7 +603,7 @@ impl const From<SocketAddrV4> for SocketAddr {
603603
}
604604

605605
#[stable(feature = "ip_from_ip", since = "1.16.0")]
606-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
606+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
607607
impl const From<SocketAddrV6> for SocketAddr {
608608
/// Converts a [`SocketAddrV6`] into a [`SocketAddr::V6`].
609609
#[inline]
@@ -613,7 +613,7 @@ impl const From<SocketAddrV6> for SocketAddr {
613613
}
614614

615615
#[stable(feature = "addr_from_into_ip", since = "1.17.0")]
616-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
616+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
617617
impl<I: ~const Into<IpAddr> + ~const Destruct> const From<(I, u16)> for SocketAddr {
618618
/// Converts a tuple struct (Into<[`IpAddr`]>, `u16`) into a [`SocketAddr`].
619619
///

library/core/src/num/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ impl Error for TryFromIntError {
2626
}
2727

2828
#[stable(feature = "try_from", since = "1.34.0")]
29-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
29+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
3030
impl const From<Infallible> for TryFromIntError {
3131
fn from(x: Infallible) -> TryFromIntError {
3232
match x {}
3333
}
3434
}
3535

3636
#[unstable(feature = "never_type", issue = "35121")]
37-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
37+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
3838
impl const From<!> for TryFromIntError {
3939
#[inline]
4040
fn from(never: !) -> TryFromIntError {

library/core/src/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ const fn from_ascii_radix_panic(radix: u32) -> ! {
13781378
macro_rules! from_str_int_impl {
13791379
($signedness:ident $($int_ty:ty)+) => {$(
13801380
#[stable(feature = "rust1", since = "1.0.0")]
1381-
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
1381+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
13821382
impl const FromStr for $int_ty {
13831383
type Err = ParseIntError;
13841384

0 commit comments

Comments
 (0)