rust/tests/ui/lint/ambiguous_wide_pointer_comparisons_suggestions.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
275 B
Rust
Raw Normal View History

//@ run-rustfix
//@ rustfix-only-machine-applicable
//@ check-pass
// See <https://github.com/rust-lang/rust/issues/121330>.
fn cmp<T: ?Sized>(a: *mut T, b: *mut T) -> bool {
let _ = a == b;
//~^ WARN ambiguous wide pointer comparison
panic!();
}
fn main() {}