Skip to content

Commit 7bc3462

Browse files
committed
tidy
1 parent 351e4bd commit 7bc3462

29 files changed

+173
-183
lines changed

library/core/src/array/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N] {
378378
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
379379
impl<T, I, const N: usize> const Index<I> for [T; N]
380380
where
381-
[T]: ~const Index<I>,
381+
[T]: [const] Index<I>,
382382
{
383383
type Output = <[T] as Index<I>>::Output;
384384

@@ -392,7 +392,7 @@ where
392392
#[rustc_const_unstable(feature = "const_index", issue = "143775")]
393393
impl<T, I, const N: usize> const IndexMut<I> for [T; N]
394394
where
395-
[T]: ~const IndexMut<I>,
395+
[T]: [const] IndexMut<I>,
396396
{
397397
#[inline]
398398
fn index_mut(&mut self, index: I) -> &mut Self::Output {

library/core/src/cell.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl<T: Copy> Clone for Cell<T> {
334334

335335
#[stable(feature = "rust1", since = "1.0.0")]
336336
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
337-
impl<T: ~const Default> const Default for Cell<T> {
337+
impl<T: [const] Default> const Default for Cell<T> {
338338
/// Creates a `Cell<T>`, with the `Default` value for T.
339339
#[inline]
340340
fn default() -> Cell<T> {
@@ -1325,7 +1325,7 @@ impl<T: Clone> Clone for RefCell<T> {
13251325

13261326
#[stable(feature = "rust1", since = "1.0.0")]
13271327
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
1328-
impl<T: ~const Default> const Default for RefCell<T> {
1328+
impl<T: [const] Default> const Default for RefCell<T> {
13291329
/// Creates a `RefCell<T>`, with the `Default` value for T.
13301330
#[inline]
13311331
fn default() -> RefCell<T> {
@@ -2333,7 +2333,7 @@ impl<T: ?Sized> UnsafeCell<T> {
23332333

23342334
#[stable(feature = "unsafe_cell_default", since = "1.10.0")]
23352335
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
2336-
impl<T: ~const Default> const Default for UnsafeCell<T> {
2336+
impl<T: [const] Default> const Default for UnsafeCell<T> {
23372337
/// Creates an `UnsafeCell`, with the `Default` value for T.
23382338
fn default() -> UnsafeCell<T> {
23392339
UnsafeCell::new(Default::default())
@@ -2438,7 +2438,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
24382438

24392439
#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
24402440
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
2441-
impl<T: ~const Default> const Default for SyncUnsafeCell<T> {
2441+
impl<T: [const] Default> const Default for SyncUnsafeCell<T> {
24422442
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
24432443
fn default() -> SyncUnsafeCell<T> {
24442444
SyncUnsafeCell::new(Default::default())

library/core/src/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub trait Clone: Sized {
212212
#[stable(feature = "rust1", since = "1.0.0")]
213213
fn clone_from(&mut self, source: &Self)
214214
where
215-
Self: ~const Destruct,
215+
Self: [const] Destruct,
216216
{
217217
*self = source.clone()
218218
}

library/core/src/cmp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ mod impls {
20222022
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
20232023
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&B> for &A
20242024
where
2025-
A: ~const PartialEq<B>,
2025+
A: [const] PartialEq<B>,
20262026
{
20272027
#[inline]
20282028
fn eq(&self, other: &&B) -> bool {
@@ -2094,7 +2094,7 @@ mod impls {
20942094
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
20952095
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&mut B> for &mut A
20962096
where
2097-
A: ~const PartialEq<B>,
2097+
A: [const] PartialEq<B>,
20982098
{
20992099
#[inline]
21002100
fn eq(&self, other: &&mut B) -> bool {
@@ -2164,7 +2164,7 @@ mod impls {
21642164
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
21652165
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&mut B> for &A
21662166
where
2167-
A: ~const PartialEq<B>,
2167+
A: [const] PartialEq<B>,
21682168
{
21692169
#[inline]
21702170
fn eq(&self, other: &&mut B) -> bool {
@@ -2180,7 +2180,7 @@ mod impls {
21802180
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
21812181
impl<A: PointeeSized, B: PointeeSized> const PartialEq<&B> for &mut A
21822182
where
2183-
A: ~const PartialEq<B>,
2183+
A: [const] PartialEq<B>,
21842184
{
21852185
#[inline]
21862186
fn eq(&self, other: &&B) -> bool {

library/core/src/cmp/bytewise.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::num::NonZero;
1919
#[rustc_specialization_trait]
2020
#[const_trait]
2121
pub(crate) unsafe trait BytewiseEq<Rhs = Self>:
22-
~const PartialEq<Rhs> + Sized
22+
[const] PartialEq<Rhs> + Sized
2323
{
2424
}
2525

library/core/src/convert/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ pub trait TryFrom<T>: Sized {
717717
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
718718
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &T
719719
where
720-
T: ~const AsRef<U>,
720+
T: [const] AsRef<U>,
721721
{
722722
#[inline]
723723
fn as_ref(&self) -> &U {
@@ -730,7 +730,7 @@ where
730730
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
731731
impl<T: PointeeSized, U: PointeeSized> const AsRef<U> for &mut T
732732
where
733-
T: ~const AsRef<U>,
733+
T: [const] AsRef<U>,
734734
{
735735
#[inline]
736736
fn as_ref(&self) -> &U {
@@ -751,7 +751,7 @@ where
751751
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
752752
impl<T: PointeeSized, U: PointeeSized> const AsMut<U> for &mut T
753753
where
754-
T: ~const AsMut<U>,
754+
T: [const] AsMut<U>,
755755
{
756756
#[inline]
757757
fn as_mut(&mut self) -> &mut U {
@@ -772,7 +772,7 @@ where
772772
#[rustc_const_unstable(feature = "const_from", issue = "143773")]
773773
impl<T, U> const Into<U> for T
774774
where
775-
U: ~const From<T>,
775+
U: [const] From<T>,
776776
{
777777
/// Calls `U::from(self)`.
778778
///
@@ -816,7 +816,7 @@ impl<T> const From<!> for T {
816816
#[rustc_const_unstable(feature = "const_from", issue = "143773")]
817817
impl<T, U> const TryInto<U> for T
818818
where
819-
U: ~const TryFrom<T>,
819+
U: [const] TryFrom<T>,
820820
{
821821
type Error = U::Error;
822822

@@ -832,7 +832,7 @@ where
832832
#[rustc_const_unstable(feature = "const_from", issue = "143773")]
833833
impl<T, U> const TryFrom<U> for T
834834
where
835-
U: ~const Into<T>,
835+
U: [const] Into<T>,
836836
{
837837
type Error = Infallible;
838838

library/core/src/intrinsics/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ pub const fn three_way_compare<T: Copy>(lhs: T, rhss: T) -> crate::cmp::Ordering
18281828
#[rustc_intrinsic]
18291829
#[track_caller]
18301830
#[miri::intrinsic_fallback_is_spec] // the fallbacks all `assume` to tell Miri
1831-
pub const unsafe fn disjoint_bitor<T: ~const fallback::DisjointBitOr>(a: T, b: T) -> T {
1831+
pub const unsafe fn disjoint_bitor<T: [const] fallback::DisjointBitOr>(a: T, b: T) -> T {
18321832
// SAFETY: same preconditions as this function.
18331833
unsafe { fallback::DisjointBitOr::disjoint_bitor(a, b) }
18341834
}
@@ -1897,7 +1897,7 @@ pub const fn mul_with_overflow<T: Copy>(x: T, y: T) -> (T, bool);
18971897
#[rustc_nounwind]
18981898
#[rustc_intrinsic]
18991899
#[miri::intrinsic_fallback_is_spec]
1900-
pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>, U>(
1900+
pub const fn carrying_mul_add<T: [const] fallback::CarryingMulAdd<Unsigned = U>, U>(
19011901
multiplier: T,
19021902
multiplicand: T,
19031903
addend: T,

library/core/src/net/socket_addr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ impl const From<SocketAddrV6> for SocketAddr {
613613

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

library/core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl<T> Copy for NonZero<T> where T: ZeroablePrimitive {}
203203
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
204204
impl<T> const PartialEq for NonZero<T>
205205
where
206-
T: ZeroablePrimitive + ~const PartialEq,
206+
T: ZeroablePrimitive + [const] PartialEq,
207207
{
208208
#[inline]
209209
fn eq(&self, other: &Self) -> bool {

library/core/src/ops/deref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<T: ?Sized> const Deref for &mut T {
269269
#[stable(feature = "rust1", since = "1.0.0")]
270270
#[const_trait]
271271
#[rustc_const_unstable(feature = "const_deref", issue = "88955")]
272-
pub trait DerefMut: ~const Deref + PointeeSized {
272+
pub trait DerefMut: [const] Deref + PointeeSized {
273273
/// Mutably dereferences the value.
274274
#[stable(feature = "rust1", since = "1.0.0")]
275275
#[rustc_diagnostic_item = "deref_mut_method"]

0 commit comments

Comments
 (0)