Skip to content

Commit d86623a

Browse files
committed
FIX: Fix future compat warning with raw pointer casts
``` warning: the type of this value must be known in this context --> src/graphmap.rs:765:11 | 765 | a.cmp(&b) | ^^^ | = note: #[warn(tyvar_behind_raw_pointer)] on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #46906 <rust-lang/rust#46906> ```
1 parent ea95d87 commit d86623a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/graphmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ impl<'b, T> Ord for Ptr<'b, T>
760760
{
761761
/// Ptr is ordered by pointer value, i.e. an arbitrary but stable and total order.
762762
fn cmp(&self, other: &Ptr<'b, T>) -> Ordering {
763-
let a = self.0 as *const _;
764-
let b = other.0 as *const _;
763+
let a: *const T = self.0;
764+
let b: *const T = other.0;
765765
a.cmp(&b)
766766
}
767767
}

0 commit comments

Comments
 (0)