We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 613bdd4 commit bce763cCopy full SHA for bce763c
1 file changed
tests/ui/type/pattern_types/signed_ranges.rs
@@ -0,0 +1,22 @@
1
+#![feature(pattern_types)]
2
+#![feature(pattern_type_macro)]
3
+
4
+//@ check-pass
5
6
+use std::pat::pattern_type;
7
8
+type Sign = pattern_type!(u32 is -10..);
9
10
+type SignedChar = pattern_type!(char is -'A'..);
11
12
+fn main() {
13
+ match 42_u8 {
14
+ -10..253 => {}
15
+ _ => {}
16
+ }
17
18
+ match 'A' {
19
+ -'\0'..'a' => {}
20
21
22
+}
0 commit comments