about summary refs log tree commit diff
path: root/tests/ui/binding/method-call-nonsensical-pattern-binding-7092.rs
blob: 4cb04cdf5bef8c87dd034c7293dd2ddcc0c34feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// https://github.com/rust-lang/rust/issues/7092
enum Whatever {
}

fn foo(x: Whatever) {
    match x { //~ NOTE this expression has type `Whatever`
        Some(field) =>
//~^ ERROR mismatched types
//~| NOTE expected `Whatever`, found `Option<_>`
//~| NOTE expected enum `Whatever`
//~| NOTE found enum `Option<_>`
            field.access(),
    }
}

fn main(){}