about summary refs log tree commit diff
path: root/tests/ui/lint/ambiguous_wide_pointer_comparisons_suggestions.rs
blob: 6ce68ff9640c8ae3e730dc1d8a2e9188e664b527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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() {}