diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser')
4 files changed, 116 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast b/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast new file mode 100644 index 000000000..8306f7361 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rast | |||
@@ -0,0 +1,76 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "use" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] | ||
7 | [email protected] | ||
8 | [email protected] "::" | ||
9 | [email protected] "crate" | ||
10 | [email protected] ";" | ||
11 | [email protected] "\n" | ||
12 | [email protected] | ||
13 | [email protected] "use" | ||
14 | [email protected] " " | ||
15 | [email protected] | ||
16 | [email protected] | ||
17 | [email protected] "{" | ||
18 | [email protected] | ||
19 | [email protected] | ||
20 | [email protected] | ||
21 | [email protected] "crate" | ||
22 | [email protected] "," | ||
23 | [email protected] " " | ||
24 | [email protected] | ||
25 | [email protected] | ||
26 | [email protected] | ||
27 | [email protected] | ||
28 | [email protected] "foo" | ||
29 | [email protected] "::" | ||
30 | [email protected] | ||
31 | [email protected] "{" | ||
32 | [email protected] | ||
33 | [email protected] | ||
34 | [email protected] | ||
35 | [email protected] "crate" | ||
36 | [email protected] "}" | ||
37 | [email protected] "}" | ||
38 | [email protected] ";" | ||
39 | [email protected] "\n" | ||
40 | [email protected] | ||
41 | [email protected] "use" | ||
42 | [email protected] " " | ||
43 | [email protected] | ||
44 | [email protected] | ||
45 | [email protected] | ||
46 | [email protected] | ||
47 | [email protected] | ||
48 | [email protected] "hello" | ||
49 | [email protected] "::" | ||
50 | [email protected] | ||
51 | [email protected] "crate" | ||
52 | [email protected] ";" | ||
53 | [email protected] "\n" | ||
54 | [email protected] | ||
55 | [email protected] "use" | ||
56 | [email protected] " " | ||
57 | [email protected] | ||
58 | [email protected] | ||
59 | [email protected] | ||
60 | [email protected] | ||
61 | [email protected] | ||
62 | [email protected] | ||
63 | [email protected] "hello" | ||
64 | [email protected] "::" | ||
65 | [email protected] | ||
66 | [email protected] "crate" | ||
67 | [email protected] "::" | ||
68 | [email protected] | ||
69 | [email protected] | ||
70 | [email protected] "there" | ||
71 | [email protected] ";" | ||
72 | [email protected] "\n" | ||
73 | error 6..11: The `crate` keyword is only allowed as the first segment of a path | ||
74 | error 31..36: The `crate` keyword is only allowed as the first segment of a path | ||
75 | error 51..56: The `crate` keyword is only allowed as the first segment of a path | ||
76 | error 69..74: The `crate` keyword is only allowed as the first segment of a path | ||
diff --git a/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs b/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs new file mode 100644 index 000000000..bead4c0b6 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/err/0040_illegal_crate_kw_location.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | use ::crate; | ||
2 | use {crate, foo::{crate}}; | ||
3 | use hello::crate; | ||
4 | use hello::crate::there; | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast new file mode 100644 index 000000000..beb6d8010 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast | |||
@@ -0,0 +1,35 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "fn" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] "foo" | ||
7 | [email protected] | ||
8 | [email protected] "(" | ||
9 | [email protected] ")" | ||
10 | [email protected] " " | ||
11 | [email protected] | ||
12 | [email protected] | ||
13 | [email protected] "{" | ||
14 | [email protected] " " | ||
15 | [email protected] | ||
16 | [email protected] | ||
17 | [email protected] | ||
18 | [email protected] | ||
19 | [email protected] | ||
20 | [email protected] "try" | ||
21 | [email protected] "!" | ||
22 | [email protected] | ||
23 | [email protected] "(" | ||
24 | [email protected] "Ok" | ||
25 | [email protected] | ||
26 | [email protected] "(" | ||
27 | [email protected] | ||
28 | [email protected] "(" | ||
29 | [email protected] ")" | ||
30 | [email protected] ")" | ||
31 | [email protected] ")" | ||
32 | [email protected] ";" | ||
33 | [email protected] " " | ||
34 | [email protected] "}" | ||
35 | [email protected] "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs new file mode 100644 index 000000000..61a6b46a0 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rs | |||
@@ -0,0 +1 @@ | |||
fn foo() { try!(Ok(())); } | |||