]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | #![feature(const_impl_trait)] |
94222f64 | 2 | #![feature(type_alias_impl_trait)] |
f9f354fc XL |
3 | |
4 | type Bar = impl Send; | |
5 | ||
6 | // While i32 is structural-match, we do not want to leak this information. | |
7 | // (See https://github.com/rust-lang/rust/issues/72156) | |
8 | const fn leak_free() -> Bar { | |
9 | 7i32 | |
10 | } | |
136023e0 | 11 | const LEAK_FREE: Bar = leak_free(); |
f9f354fc XL |
12 | |
13 | fn leak_free_test() { | |
14 | match todo!() { | |
15 | LEAK_FREE => (), | |
136023e0 | 16 | //~^ `impl Send` cannot be used in patterns |
f9f354fc XL |
17 | _ => (), |
18 | } | |
19 | } | |
20 | ||
1b1a35ee | 21 | fn main() {} |