summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/structural-match.rs
blob: 7cc9ccaabdca4a0c2c080e7eb5fd88b5805440de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(type_alias_impl_trait)]

type Foo = impl Send;

// This is not structural-match
struct A;

const fn value() -> Foo {
    A
}
const VALUE: Foo = value();

fn test() {
    match VALUE {
        VALUE => (),
        //~^ `Foo` cannot be used in patterns
        _ => (),
    }
}

fn main() {}