]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | #![feature(const_impl_trait)] |
2 | // revisions: min_tait full_tait | |
3 | #![feature(min_type_alias_impl_trait)] | |
4 | #![cfg_attr(full_tait, feature(type_alias_impl_trait, impl_trait_in_bindings))] | |
5 | //[full_tait]~^ WARN incomplete | |
6 | //[full_tait]~| WARN incomplete | |
f9f354fc XL |
7 | |
8 | type Foo = impl Send; | |
9 | ||
10 | // This is not structural-match | |
11 | struct A; | |
12 | ||
13 | const fn value() -> Foo { | |
14 | A | |
15 | } | |
6a06907d | 16 | const VALUE: Foo = value(); //[min_tait]~ ERROR not permitted here |
f9f354fc XL |
17 | |
18 | fn test() { | |
19 | match todo!() { | |
20 | VALUE => (), | |
6a06907d | 21 | //[full_tait]~^ `impl Send` cannot be used in patterns |
f9f354fc XL |
22 | _ => (), |
23 | } | |
24 | } | |
25 | ||
1b1a35ee | 26 | fn main() {} |