]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/structural-match.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / structural-match.rs
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
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 }
16 const VALUE: Foo = value(); //[min_tait]~ ERROR not permitted here
17
18 fn test() {
19     match todo!() {
20         VALUE => (),
21         //[full_tait]~^ `impl Send` cannot be used in patterns
22         _ => (),
23     }
24 }
25
26 fn main() {}