aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2020-04-03 20:12:10 +0100
committerAleksey Kladov <[email protected]>2020-04-09 12:05:41 +0100
commit74e3b48806cb1b6d583178c6f24c7183626f4327 (patch)
tree125bcd4aaf11388acf17e0a8afa7d08597305a0e /crates/ra_parser
parent689661c95968cb438f8bd1f10ce0ee096287741b (diff)
Parse correctly fn f<T>() 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
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar.rs2
1 files changed, 1 insertions, 1 deletions
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 {
245 if p.at(T![->]) { 245 if p.at(T![->]) {
246 let m = p.start(); 246 let m = p.start();
247 p.bump(T![->]); 247 p.bump(T![->]);
248 types::type_(p); 248 types::type_no_bounds(p);
249 m.complete(p, RET_TYPE); 249 m.complete(p, RET_TYPE);
250 true 250 true
251 } else { 251 } else {