diff options
Diffstat (limited to 'src/grammar/paths.rs')
-rw-r--r-- | src/grammar/paths.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/grammar/paths.rs b/src/grammar/paths.rs index fe69db096..6d406645f 100644 --- a/src/grammar/paths.rs +++ b/src/grammar/paths.rs | |||
@@ -71,7 +71,16 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) { | |||
71 | fn path_generic_args(p: &mut Parser, mode: Mode) { | 71 | fn path_generic_args(p: &mut Parser, mode: Mode) { |
72 | match mode { | 72 | match mode { |
73 | Mode::Use => return, | 73 | Mode::Use => return, |
74 | Mode::Type => type_args::type_arg_list(p, false), | 74 | Mode::Type => { |
75 | // test path_fn_trait_args | ||
76 | // type F = Box<Fn(x: i32) -> ()>; | ||
77 | if p.at(L_PAREN) { | ||
78 | params::param_list(p); | ||
79 | fn_ret_type(p); | ||
80 | } else { | ||
81 | type_args::type_arg_list(p, false) | ||
82 | } | ||
83 | }, | ||
75 | Mode::Expr => type_args::type_arg_list(p, true), | 84 | Mode::Expr => type_args::type_arg_list(p, true), |
76 | } | 85 | } |
77 | } | 86 | } |