File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1864,6 +1864,7 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz
18641864/// ```
18651865#[ stable( feature = "ptr_eq" , since = "1.17.0" ) ]
18661866#[ inline( always) ]
1867+ #[ must_use = "pointer comparison produces a value" ]
18671868pub fn eq < T : ?Sized > ( a : * const T , b : * const T ) -> bool {
18681869 a == b
18691870}
@@ -1886,6 +1887,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
18861887/// ```
18871888#[ unstable( feature = "ptr_addr_eq" , issue = "116324" ) ]
18881889#[ inline( always) ]
1890+ #[ must_use = "pointer comparison produces a value" ]
18891891pub fn addr_eq < T : ?Sized , U : ?Sized > ( p : * const T , q : * const U ) -> bool {
18901892 ( p as * const ( ) ) == ( q as * const ( ) )
18911893}
You can’t perform that action at this time.
0 commit comments