small correction to fmt::Pointer impl · model-checking/verify-rust-std@bf9096f (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
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
Lines changed: 1 addition & 2 deletions
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 |