aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 17:26:51 +0100
committerAleksey Kladov <[email protected]>2020-08-12 17:30:53 +0100
commita1c187eef3ba08076aedb5154929f7eda8d1b424 (patch)
tree9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs
parent3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff)
Rename ra_syntax -> syntax
Diffstat (limited to 'crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs')
-rw-r--r--crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs b/crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs
new file mode 100644
index 000000000..bbd6b0f6e
--- /dev/null
+++ b/crates/syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rs
@@ -0,0 +1,27 @@
1// https://github.com/rust-analyzer/rust-analyzer/issues/972
2
3fn main() {
4 match Some(-1) {
5 Some(-1) => (),
6 _ => (),
7 }
8
9 match Some((-1, -1)) {
10 Some((-1, -1)) => (),
11 _ => (),
12 }
13
14 match A::B(-1, -1) {
15 A::B(-1, -1) => (),
16 _ => (),
17 }
18
19 if let Some(-1) = Some(-1) {
20 }
21}
22
23enum A {
24 B(i8, i8)
25}
26
27fn foo(-128..=127: i8) {}