]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/structural-match.rs
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / type-alias-impl-trait / structural-match.rs
1 #![feature(type_alias_impl_trait)]
2
3 type Foo = impl Send;
4
5 // This is not structural-match
6 struct A;
7
8 const fn value() -> Foo {
9     A
10 }
11 const VALUE: Foo = value();
12
13 fn test() {
14     match VALUE {
15         VALUE => (),
16         //~^ `Foo` cannot be used in patterns
17         _ => (),
18     }
19 }
20
21 fn main() {}