We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3e70c7 commit 9b6939bCopy full SHA for 9b6939b
src/liballoc/boxed.rs
@@ -278,7 +278,10 @@ impl<T: fmt::Debug + ?Sized> fmt::Debug for Box<T> {
278
#[stable(feature = "rust1", since = "1.0.0")]
279
impl<T> fmt::Pointer for Box<T> {
280
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
281
- fmt::Pointer::fmt(&*self, f)
+ // It's not possible to extract the inner Uniq directly from the Box,
282
+ // instead we cast it to a *const which aliases the Unique
283
+ let ptr: *const T = &**self;
284
+ fmt::Pointer::fmt(&ptr, f)
285
}
286
287
0 commit comments