File tree 3 files changed +3
-6
lines changed
3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -861,8 +861,7 @@ impl<T> Pointer for *const T {
861
861
// The formats need two extra bytes, for the 0x
862
862
if cfg ! ( target_pointer_width = "32" ) {
863
863
f. width = Some ( 10 ) ;
864
- }
865
- if cfg ! ( target_pointer_width = "64" ) {
864
+ } else {
866
865
f. width = Some ( 18 ) ;
867
866
}
868
867
}
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ fn main() {
26
26
if cfg ! ( target_pointer_width = "32" ) {
27
27
assert_eq ! ( format!( "{:#p}" , p) ,
28
28
"0x00000000" ) ;
29
- }
30
- if cfg ! ( target_pointer_width = "64" ) {
29
+ } else {
31
30
assert_eq ! ( format!( "{:#p}" , p) ,
32
31
"0x0000000000000000" ) ;
33
32
}
Original file line number Diff line number Diff line change @@ -75,8 +75,7 @@ pub fn main() {
75
75
if cfg ! ( target_pointer_width = "32" ) {
76
76
t ! ( format!( "{:#p}" , 0x1234 as * const isize ) , "0x00001234" ) ;
77
77
t ! ( format!( "{:#p}" , 0x1234 as * mut isize ) , "0x00001234" ) ;
78
- }
79
- if cfg ! ( target_pointer_width = "64" ) {
78
+ } else {
80
79
t ! ( format!( "{:#p}" , 0x1234 as * const isize ) , "0x0000000000001234" ) ;
81
80
t ! ( format!( "{:#p}" , 0x1234 as * mut isize ) , "0x0000000000001234" ) ;
82
81
}
You can’t perform that action at this time.
0 commit comments