]>
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 Bar = impl Send; | |
9 | ||
10 | // While i32 is structural-match, we do not want to leak this information. | |
11 | // (See https://github.com/rust-lang/rust/issues/72156) | |
12 | const fn leak_free() -> Bar { | |
13 | 7i32 | |
14 | } | |
6a06907d | 15 | const LEAK_FREE: Bar = leak_free(); //[min_tait]~ ERROR not permitted here |
f9f354fc XL |
16 | |
17 | fn leak_free_test() { | |
18 | match todo!() { | |
19 | LEAK_FREE => (), | |
6a06907d | 20 | //[full_tait]~^ `impl Send` cannot be used in patterns |
f9f354fc XL |
21 | _ => (), |
22 | } | |
23 | } | |
24 | ||
1b1a35ee | 25 | fn main() {} |