]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/structural-match.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / structural-match.rs
CommitLineData
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
8type Foo = impl Send;
9
10// This is not structural-match
11struct A;
12
13const fn value() -> Foo {
14 A
15}
6a06907d 16const VALUE: Foo = value(); //[min_tait]~ ERROR not permitted here
f9f354fc
XL
17
18fn test() {
19 match todo!() {
20 VALUE => (),
6a06907d 21 //[full_tait]~^ `impl Send` cannot be used in patterns
f9f354fc
XL
22 _ => (),
23 }
24}
25
1b1a35ee 26fn main() {}