Skip to content

Commit 6651cb6

Browse files
committed
Remove Display, LowerExp, UpperExp impls for Alignment
1 parent 5c7f096 commit 6651cb6

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

library/core/src/ptr/alignment.rs

-26
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,6 @@ impl fmt::Debug for Alignment {
163163
}
164164
}
165165

166-
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
167-
impl fmt::Display for Alignment {
168-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
169-
fmt::Display::fmt(&self.as_nonzero(), f)
170-
}
171-
}
172-
173166
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
174167
impl fmt::Binary for Alignment {
175168
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -230,25 +223,6 @@ impl Alignment {
230223
}
231224
}
232225

233-
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
234-
impl fmt::LowerExp for Alignment {
235-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
236-
let mut buf = [0; 6];
237-
238-
// SAFETY: We generate an ASCII string, which is valid UTF-8.
239-
f.pad(unsafe { str::from_utf8_unchecked(self.fmt_exp(&mut buf, b'p')) })
240-
}
241-
}
242-
243-
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
244-
impl fmt::UpperExp for Alignment {
245-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
246-
let mut buf = [0; 6];
247-
// SAFETY: We generate an ASCII string, which is valid UTF-8.
248-
f.pad(unsafe { str::from_utf8_unchecked(self.fmt_exp(&mut buf, b'P')) })
249-
}
250-
}
251-
252226
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
253227
impl TryFrom<NonZeroUsize> for Alignment {
254228
type Error = num::TryFromIntError;

0 commit comments

Comments
 (0)