about summary refs log tree commit diff
path: root/tests/ui/inference/hint-closure-signature-119266.rs
blob: 6e136c57ccad325de83e85ac4284cc6deb795730 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let x = |a: u8, b: (usize, u32), c: fn() -> char| -> String { "I love beans.".to_string() };
    //~^ NOTE: the found closure

    let x: fn(i32) = x;
    //~^ ERROR: mismatched types [E0308]
    //~| NOTE: incorrect number of function parameters
    //~| NOTE: expected due to this
    //~| NOTE: expected fn pointer `fn(i32)`
    //~| NOTE: closure has signature: `fn(u8, (usize, u32), fn() -> char) -> String`
}