mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-07 11:00:38 +00:00
Lower Fn(X, Y) -> Z
paths
This commit is contained in:
parent
60bdb66ef2
commit
d21cdf3c99
4 changed files with 55 additions and 13 deletions
|
@ -2312,6 +2312,12 @@ impl PathSegment {
|
|||
pub fn type_arg_list(&self) -> Option<TypeArgList> {
|
||||
AstChildren::new(&self.syntax).next()
|
||||
}
|
||||
pub fn param_list(&self) -> Option<ParamList> {
|
||||
AstChildren::new(&self.syntax).next()
|
||||
}
|
||||
pub fn ret_type(&self) -> Option<RetType> {
|
||||
AstChildren::new(&self.syntax).next()
|
||||
}
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct PathType {
|
||||
|
|
|
@ -684,7 +684,7 @@ Grammar(
|
|||
]
|
||||
),
|
||||
"PathSegment": (
|
||||
options: [ "NameRef", "TypeArgList" ]
|
||||
options: [ "NameRef", "TypeArgList", "ParamList", "RetType" ]
|
||||
),
|
||||
"TypeArgList": (collections: [
|
||||
("type_args", "TypeArg"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue