diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-09 12:09:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-09 12:09:19 +0100 |
commit | 1647d5ac60eb5d5c80e7fbadcea55597ec7efaa0 (patch) | |
tree | 125bcd4aaf11388acf17e0a8afa7d08597305a0e /crates/ra_parser/src | |
parent | cfc127f52988cf4f95797cb355398e3af32632aa (diff) | |
parent | 74e3b48806cb1b6d583178c6f24c7183626f4327 (diff) |
Merge #3912
3912: Parse correctly fn f<T>() where T: Fn() -> u8 + Send {} r=matklad a=matklad
We used to parse it as T: Fn() -> (u8 + Send), which is different from
the rustc behavior of T: (Fn() -> u8) + Send
bors r+
🤖
Co-authored-by: Luca Barbieri <[email protected]>
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 2 |
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 { |