]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/structural-match.rs
Update upstream source from tag 'upstream/1.56.0_beta.4+dfsg1'
[rustc.git] / src / test / ui / type-alias-impl-trait / structural-match.rs
1 #![feature(const_impl_trait)]
2 #![feature(type_alias_impl_trait)]
3
4 type Foo = impl Send;
5
6 // This is not structural-match
7 struct A;
8
9 const fn value() -> Foo {
10 A
11 }
12 const VALUE: Foo = value();
13
14 fn test() {
15 match todo!() {
16 VALUE => (),
17 //~^ `impl Send` cannot be used in patterns
18 _ => (),
19 }
20 }
21
22 fn main() {}