mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Remove (..)
-style return type notation
This commit is contained in:
parent
a4966c9282
commit
d7d8971203
6 changed files with 2 additions and 101 deletions
|
@ -76,7 +76,6 @@ fn generic_arg(p: &mut Parser<'_>) -> bool {
|
|||
}
|
||||
}
|
||||
}
|
||||
IDENT if p.nth(1) == T!['('] && p.nth_at(2, T![..]) => return_type_arg(p),
|
||||
_ if p.at_ts(types::TYPE_FIRST) => type_arg(p),
|
||||
_ => return false,
|
||||
}
|
||||
|
@ -140,20 +139,3 @@ fn type_arg(p: &mut Parser<'_>) {
|
|||
types::type_(p);
|
||||
m.complete(p, TYPE_ARG);
|
||||
}
|
||||
|
||||
// test return_type_arg
|
||||
// type T = S<foo(..): Send>;
|
||||
pub(super) fn return_type_arg(p: &mut Parser<'_>) {
|
||||
let m = p.start();
|
||||
p.expect(IDENT);
|
||||
p.expect(T!['(']);
|
||||
p.expect(T![..]);
|
||||
p.expect(T![')']);
|
||||
if !p.at(T![:]) {
|
||||
p.error("expected :");
|
||||
m.abandon(p);
|
||||
return;
|
||||
}
|
||||
generic_params::bounds(p);
|
||||
m.complete(p, RETURN_TYPE_ARG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue