Skip to content

Commit 3df9a7b

Browse files
committed
Shorten COMPARE_PACKED => CP where it is not important
why can't I _ it :'(
1 parent 8f40820 commit 3df9a7b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

compiler/rustc_data_structures/src/tagged_ptr/copy.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ where
2424
tag_ghost: PhantomData<T>,
2525
}
2626

27-
impl<P, T, const COMPARE_PACKED: bool> Copy for CopyTaggedPtr<P, T, COMPARE_PACKED>
27+
impl<P, T, const CP: bool> Copy for CopyTaggedPtr<P, T, CP>
2828
where
2929
P: Pointer,
3030
T: Tag,
3131
P: Copy,
3232
{
3333
}
3434

35-
impl<P, T, const COMPARE_PACKED: bool> Clone for CopyTaggedPtr<P, T, COMPARE_PACKED>
35+
impl<P, T, const CP: bool> Clone for CopyTaggedPtr<P, T, CP>
3636
where
3737
P: Pointer,
3838
T: Tag,
@@ -46,7 +46,7 @@ where
4646
// We pack the tag into the *upper* bits of the pointer to ease retrieval of the
4747
// value; a left shift is a multiplication and those are embeddable in
4848
// instruction encoding.
49-
impl<P, T, const COMPARE_PACKED: bool> CopyTaggedPtr<P, T, COMPARE_PACKED>
49+
impl<P, T, const CP: bool> CopyTaggedPtr<P, T, CP>
5050
where
5151
P: Pointer,
5252
T: Tag,
@@ -126,7 +126,7 @@ where
126126
}
127127
}
128128

129-
impl<P, T, const COMPARE_PACKED: bool> Deref for CopyTaggedPtr<P, T, COMPARE_PACKED>
129+
impl<P, T, const CP: bool> Deref for CopyTaggedPtr<P, T, CP>
130130
where
131131
P: Pointer,
132132
T: Tag,
@@ -141,7 +141,7 @@ where
141141
}
142142
}
143143

144-
impl<P, T, const COMPARE_PACKED: bool> DerefMut for CopyTaggedPtr<P, T, COMPARE_PACKED>
144+
impl<P, T, const CP: bool> DerefMut for CopyTaggedPtr<P, T, CP>
145145
where
146146
P: Pointer + DerefMut,
147147
T: Tag,
@@ -155,7 +155,7 @@ where
155155
}
156156
}
157157

158-
impl<P, T, const COMPARE_PACKED: bool> fmt::Debug for CopyTaggedPtr<P, T, COMPARE_PACKED>
158+
impl<P, T, const CP: bool> fmt::Debug for CopyTaggedPtr<P, T, CP>
159159
where
160160
P: Pointer + fmt::Debug,
161161
T: Tag + fmt::Debug,
@@ -194,7 +194,7 @@ where
194194
}
195195
}
196196

197-
impl<P, T, HCX, const COMPARE_PACKED: bool> HashStable<HCX> for CopyTaggedPtr<P, T, COMPARE_PACKED>
197+
impl<P, T, HCX, const CP: bool> HashStable<HCX> for CopyTaggedPtr<P, T, CP>
198198
where
199199
P: Pointer + HashStable<HCX>,
200200
T: Tag + HashStable<HCX>,

compiler/rustc_data_structures/src/tagged_ptr/drop.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ where
1717
raw: CopyTaggedPtr<P, T, COMPARE_PACKED>,
1818
}
1919

20-
impl<P, T, const COMPARE_PACKED: bool> Clone for TaggedPtr<P, T, COMPARE_PACKED>
20+
impl<P, T, const CP: bool> Clone for TaggedPtr<P, T, CP>
2121
where
2222
P: Pointer + Clone,
2323
T: Tag,
@@ -32,7 +32,7 @@ where
3232
// We pack the tag into the *upper* bits of the pointer to ease retrieval of the
3333
// value; a right shift is a multiplication and those are embeddable in
3434
// instruction encoding.
35-
impl<P, T, const COMPARE_PACKED: bool> TaggedPtr<P, T, COMPARE_PACKED>
35+
impl<P, T, const CP: bool> TaggedPtr<P, T, CP>
3636
where
3737
P: Pointer,
3838
T: Tag,
@@ -46,7 +46,7 @@ where
4646
}
4747
}
4848

49-
impl<P, T, const COMPARE_PACKED: bool> std::ops::Deref for TaggedPtr<P, T, COMPARE_PACKED>
49+
impl<P, T, const CP: bool> std::ops::Deref for TaggedPtr<P, T, CP>
5050
where
5151
P: Pointer,
5252
T: Tag,
@@ -57,7 +57,7 @@ where
5757
}
5858
}
5959

60-
impl<P, T, const COMPARE_PACKED: bool> std::ops::DerefMut for TaggedPtr<P, T, COMPARE_PACKED>
60+
impl<P, T, const CP: bool> std::ops::DerefMut for TaggedPtr<P, T, CP>
6161
where
6262
P: Pointer + std::ops::DerefMut,
6363
T: Tag,
@@ -67,7 +67,7 @@ where
6767
}
6868
}
6969

70-
impl<P, T, const COMPARE_PACKED: bool> Drop for TaggedPtr<P, T, COMPARE_PACKED>
70+
impl<P, T, const CP: bool> Drop for TaggedPtr<P, T, CP>
7171
where
7272
P: Pointer,
7373
T: Tag,
@@ -80,7 +80,7 @@ where
8080
}
8181
}
8282

83-
impl<P, T, const COMPARE_PACKED: bool> fmt::Debug for TaggedPtr<P, T, COMPARE_PACKED>
83+
impl<P, T, const CP: bool> fmt::Debug for TaggedPtr<P, T, CP>
8484
where
8585
P: Pointer + fmt::Debug,
8686
T: Tag + fmt::Debug,
@@ -119,7 +119,7 @@ where
119119
}
120120
}
121121

122-
impl<P, T, HCX, const COMPARE_PACKED: bool> HashStable<HCX> for TaggedPtr<P, T, COMPARE_PACKED>
122+
impl<P, T, HCX, const CP: bool> HashStable<HCX> for TaggedPtr<P, T, CP>
123123
where
124124
P: Pointer + HashStable<HCX>,
125125
T: Tag + HashStable<HCX>,

0 commit comments

Comments
 (0)