From 74e3b48806cb1b6d583178c6f24c7183626f4327 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 3 Apr 2020 21:12:10 +0200 Subject: Parse correctly fn f() where T: Fn() -> u8 + Send {} We used to parse it as T: Fn() -> (u8 + Send), which is different from the rustc behavior of T: (Fn() -> u8) + Send --- crates/ra_parser/src/grammar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_parser/src/grammar.rs') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index 58098e810..d0530955e 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -245,7 +245,7 @@ fn opt_fn_ret_type(p: &mut Parser) -> bool { if p.at(T![->]) { let m = p.start(); p.bump(T![->]); - types::type_(p); + types::type_no_bounds(p); m.complete(p, RET_TYPE); true } else { -- cgit v1.2.3