small correction to fmt::Pointer impl · model-checking/verify-rust-std@bf9096f (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit bf9096f
small correction to fmt::Pointer impl
the `expose_provenance` method does not require `T: Sized`
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2478,8 +2478,7 @@ impl Display for char { | ||
2478 | 2478 | #[stable(feature = "rust1", since = "1.0.0")] |
2479 | 2479 | impl<T: ?Sized> Pointer for *const T { |
2480 | 2480 | fn fmt(&self, f: &mut Formatter<'_>) -> Result { |
2481 | -// Cast is needed here because `.expose_provenance()` requires `T: Sized`. | |
2482 | -pointer_fmt_inner((*self as *const ()).expose_provenance(), f) | |
2481 | +pointer_fmt_inner(self.expose_provenance(), f) | |
2483 | 2482 | } |
2484 | 2483 | } |
2485 | 2484 |