diff options
author | DJMcNab <[email protected]> | 2018-12-20 16:45:54 +0000 |
---|---|---|
committer | DJMcNab <[email protected]> | 2018-12-20 16:45:54 +0000 |
commit | 134fe4f566d94fd4ca91c6417fab0ae7b3e4275f (patch) | |
tree | 54d5d31d8df65982163e1ff735e1461d672d8376 /crates/ra_syntax/src | |
parent | 466885aa5bad53732786380f7579880fe2fd5645 (diff) |
Fix the tests and fix the precommit hook
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions/atom.rs | 4 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/items.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/items/traits.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/items/use_item.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/type_args.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/types.rs | 6 |
6 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs index 3b5749318..31b09ac5b 100644 --- a/crates/ra_syntax/src/grammar/expressions/atom.rs +++ b/crates/ra_syntax/src/grammar/expressions/atom.rs | |||
@@ -89,7 +89,7 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar | |||
89 | WHILE_KW => while_expr(p, Some(m)), | 89 | WHILE_KW => while_expr(p, Some(m)), |
90 | L_CURLY => block_expr(p, Some(m)), | 90 | L_CURLY => block_expr(p, Some(m)), |
91 | _ => { | 91 | _ => { |
92 | // test misplaced_label_err | 92 | // test_err misplaced_label_err |
93 | // fn main() { | 93 | // fn main() { |
94 | // 'loop: impl | 94 | // 'loop: impl |
95 | // } | 95 | // } |
@@ -354,7 +354,7 @@ pub(crate) fn match_arm_list(p: &mut Parser) { | |||
354 | // fn foo() { | 354 | // fn foo() { |
355 | // match () { | 355 | // match () { |
356 | // _ => (), | 356 | // _ => (), |
357 | // _ if Test>{field: 0} => (), | 357 | // _ if Test > Test{field: 0} => (), |
358 | // X | Y if Z => (), | 358 | // X | Y if Z => (), |
359 | // | X | Y if Z => (), | 359 | // | X | Y if Z => (), |
360 | // | X => (), | 360 | // | X => (), |
diff --git a/crates/ra_syntax/src/grammar/items.rs b/crates/ra_syntax/src/grammar/items.rs index 4473c2fab..b646dd070 100644 --- a/crates/ra_syntax/src/grammar/items.rs +++ b/crates/ra_syntax/src/grammar/items.rs | |||
@@ -89,7 +89,7 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { | |||
89 | // modifiers | 89 | // modifiers |
90 | has_mods |= p.eat(CONST_KW); | 90 | has_mods |= p.eat(CONST_KW); |
91 | 91 | ||
92 | // test unsafe_block_in_mod | 92 | // test_err unsafe_block_in_mod |
93 | // fn foo(){} unsafe { } fn bar(){} | 93 | // fn foo(){} unsafe { } fn bar(){} |
94 | if p.at(UNSAFE_KW) && p.nth(1) != L_CURLY { | 94 | if p.at(UNSAFE_KW) && p.nth(1) != L_CURLY { |
95 | p.eat(UNSAFE_KW); | 95 | p.eat(UNSAFE_KW); |
diff --git a/crates/ra_syntax/src/grammar/items/traits.rs b/crates/ra_syntax/src/grammar/items/traits.rs index 31258c253..d4da8b2f7 100644 --- a/crates/ra_syntax/src/grammar/items/traits.rs +++ b/crates/ra_syntax/src/grammar/items/traits.rs | |||
@@ -116,7 +116,7 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool { | |||
116 | && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ) | 116 | && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ) |
117 | } | 117 | } |
118 | 118 | ||
119 | // test impl_type | 119 | // test_err impl_type |
120 | // impl Type {} | 120 | // impl Type {} |
121 | // impl Trait1 for T {} | 121 | // impl Trait1 for T {} |
122 | // impl impl NotType {} | 122 | // impl impl NotType {} |
diff --git a/crates/ra_syntax/src/grammar/items/use_item.rs b/crates/ra_syntax/src/grammar/items/use_item.rs index b3c78f351..5111d37eb 100644 --- a/crates/ra_syntax/src/grammar/items/use_item.rs +++ b/crates/ra_syntax/src/grammar/items/use_item.rs | |||
@@ -74,7 +74,7 @@ fn use_tree(p: &mut Parser) { | |||
74 | // other::path as some_other_name, | 74 | // other::path as some_other_name, |
75 | // different::path as different_name, | 75 | // different::path as different_name, |
76 | // yet::another::path, | 76 | // yet::another::path, |
77 | // running::out::of::synonyms::for::different::* | 77 | // running::out::of::synonyms::for_::different::* |
78 | // }; | 78 | // }; |
79 | opt_alias(p); | 79 | opt_alias(p); |
80 | } | 80 | } |
diff --git a/crates/ra_syntax/src/grammar/type_args.rs b/crates/ra_syntax/src/grammar/type_args.rs index 29ff6e534..f889419c5 100644 --- a/crates/ra_syntax/src/grammar/type_args.rs +++ b/crates/ra_syntax/src/grammar/type_args.rs | |||
@@ -26,7 +26,7 @@ pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { | |||
26 | } | 26 | } |
27 | 27 | ||
28 | // test type_arg | 28 | // test type_arg |
29 | // type A = B<'static, i32, Item=u64> | 29 | // type A = B<'static, i32, Item=u64>; |
30 | fn type_arg(p: &mut Parser) { | 30 | fn type_arg(p: &mut Parser) { |
31 | let m = p.start(); | 31 | let m = p.start(); |
32 | match p.current() { | 32 | match p.current() { |
diff --git a/crates/ra_syntax/src/grammar/types.rs b/crates/ra_syntax/src/grammar/types.rs index 811d399d4..a933b986b 100644 --- a/crates/ra_syntax/src/grammar/types.rs +++ b/crates/ra_syntax/src/grammar/types.rs | |||
@@ -97,7 +97,7 @@ fn pointer_type(p: &mut Parser) { | |||
97 | // type C = *mut (); | 97 | // type C = *mut (); |
98 | MUT_KW | CONST_KW => p.bump(), | 98 | MUT_KW | CONST_KW => p.bump(), |
99 | _ => { | 99 | _ => { |
100 | // test pointer_type_no_mutability | 100 | // test_err pointer_type_no_mutability |
101 | // type T = *(); | 101 | // type T = *(); |
102 | p.error( | 102 | p.error( |
103 | "expected mut or const in raw pointer type \ | 103 | "expected mut or const in raw pointer type \ |
@@ -132,7 +132,7 @@ fn array_or_slice_type(p: &mut Parser) { | |||
132 | p.expect(R_BRACK); | 132 | p.expect(R_BRACK); |
133 | ARRAY_TYPE | 133 | ARRAY_TYPE |
134 | } | 134 | } |
135 | // test array_type_missing_semi | 135 | // test_err array_type_missing_semi |
136 | // type T = [() 92]; | 136 | // type T = [() 92]; |
137 | _ => { | 137 | _ => { |
138 | p.error("expected `;` or `]`"); | 138 | p.error("expected `;` or `]`"); |
@@ -175,7 +175,7 @@ fn fn_pointer_type(p: &mut Parser) { | |||
175 | if p.at(EXTERN_KW) { | 175 | if p.at(EXTERN_KW) { |
176 | abi(p); | 176 | abi(p); |
177 | } | 177 | } |
178 | // test fn_pointer_type_missing_fn | 178 | // test_err fn_pointer_type_missing_fn |
179 | // type F = unsafe (); | 179 | // type F = unsafe (); |
180 | if !p.eat(FN_KW) { | 180 | if !p.eat(FN_KW) { |
181 | m.abandon(p); | 181 | m.abandon(p); |