about summary refs log tree commit diff
path: root/tests/ui/lint/fn-ptr-comparisons-134345.rs
blob: 9650a910a3467edf32af0927cd2d67671495ce72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This check veifies that we do not ICE when not showing a user type
// in the suggestions/diagnostics.
//
// cf. https://github.com/rust-lang/rust/issues/134345
//
//@ check-pass

struct A;

fn fna(_a: A) {}

#[allow(unpredictable_function_pointer_comparisons)]
fn main() {
    let fa: fn(A) = fna;
    let _ = fa == fna;
}