@@ -70,7 +70,7 @@ pub trait Provenance: Copy + PartialEq + fmt::Debug + 'static {
7070 const WILDCARD : Option < Self > ;
7171
7272 /// Determines how a pointer should be printed.
73- fn fmt ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ;
73+ fn fmt_ptr ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ;
7474
7575 /// If `OFFSET_IS_ADDR == false`, provenance must always be able to
7676 /// identify the allocation this ptr points to (i.e., this must return `Some`).
@@ -174,7 +174,7 @@ impl Provenance for CtfeProvenance {
174174 // `CtfeProvenance` does not implement wildcard provenance.
175175 const WILDCARD : Option < Self > = None ;
176176
177- fn fmt ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
177+ fn fmt_ptr ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
178178 // Print AllocId.
179179 fmt:: Debug :: fmt ( & ptr. provenance . alloc_id ( ) , f) ?; // propagates `alternate` flag
180180 // Print offset only if it is non-zero.
@@ -206,7 +206,7 @@ impl Provenance for AllocId {
206206 // `AllocId` does not implement wildcard provenance.
207207 const WILDCARD : Option < Self > = None ;
208208
209- fn fmt ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
209+ fn fmt_ptr ( ptr : & Pointer < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
210210 // Forward `alternate` flag to `alloc_id` printing.
211211 if f. alternate ( ) {
212212 write ! ( f, "{:#?}" , ptr. provenance) ?;
@@ -248,14 +248,14 @@ static_assert_size!(Pointer<Option<CtfeProvenance>>, 16);
248248// all the Miri types.
249249impl < Prov : Provenance > fmt:: Debug for Pointer < Prov > {
250250 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
251- Provenance :: fmt ( self , f)
251+ Provenance :: fmt_ptr ( self , f)
252252 }
253253}
254254
255255impl < Prov : Provenance > fmt:: Debug for Pointer < Option < Prov > > {
256256 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
257257 match self . provenance {
258- Some ( prov) => Provenance :: fmt ( & Pointer :: new ( prov, self . offset ) , f) ,
258+ Some ( prov) => Provenance :: fmt_ptr ( & Pointer :: new ( prov, self . offset ) , f) ,
259259 None => write ! ( f, "{:#x}[noalloc]" , self . offset. bytes( ) ) ,
260260 }
261261 }
0 commit comments