mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
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
This commit is contained in:
parent
689661c959
commit
74e3b48806
3 changed files with 63 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue