aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/paths.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-24 00:14:10 +0100
committerAleksey Kladov <[email protected]>2018-08-24 00:14:10 +0100
commita66c94af1bad3c2dcfd8dd4c07494d0cf6cc8b1b (patch)
treeee437a908df36ead848cb83d9224b22bdcecce5b /crates/libsyntax2/src/grammar/paths.rs
parentdc40f1298a8d4dcb7a26d5af38c4fb7ef3d6c5df (diff)
renames
Diffstat (limited to 'crates/libsyntax2/src/grammar/paths.rs')
-rw-r--r--crates/libsyntax2/src/grammar/paths.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/libsyntax2/src/grammar/paths.rs b/crates/libsyntax2/src/grammar/paths.rs
index 97ab1880b..8f5e82d91 100644
--- a/crates/libsyntax2/src/grammar/paths.rs
+++ b/crates/libsyntax2/src/grammar/paths.rs
@@ -69,7 +69,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) {
69 match p.current() { 69 match p.current() {
70 IDENT => { 70 IDENT => {
71 name_ref(p); 71 name_ref(p);
72 path_generic_args(p, mode); 72 opt_path_type_args(p, mode);
73 } 73 }
74 SELF_KW | SUPER_KW => p.bump(), 74 SELF_KW | SUPER_KW => p.bump(),
75 _ => { 75 _ => {
@@ -80,7 +80,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) {
80 m.complete(p, PATH_SEGMENT); 80 m.complete(p, PATH_SEGMENT);
81} 81}
82 82
83fn path_generic_args(p: &mut Parser, mode: Mode) { 83fn opt_path_type_args(p: &mut Parser, mode: Mode) {
84 match mode { 84 match mode {
85 Mode::Use => return, 85 Mode::Use => return,
86 Mode::Type => { 86 Mode::Type => {
@@ -88,11 +88,11 @@ fn path_generic_args(p: &mut Parser, mode: Mode) {
88 // type F = Box<Fn(x: i32) -> ()>; 88 // type F = Box<Fn(x: i32) -> ()>;
89 if p.at(L_PAREN) { 89 if p.at(L_PAREN) {
90 params::param_list_opt_patterns(p); 90 params::param_list_opt_patterns(p);
91 fn_ret_type(p); 91 opt_fn_ret_type(p);
92 } else { 92 } else {
93 type_args::type_arg_list(p, false) 93 type_args::opt_type_arg_list(p, false)
94 } 94 }
95 }, 95 },
96 Mode::Expr => type_args::type_arg_list(p, true), 96 Mode::Expr => type_args::opt_type_arg_list(p, true),
97 } 97 }
98} 98}