Skip to content

miss a method to access all PathType in PathSegment #15778

Closed
@Young-Flash

Description

@Young-Flash

There are only pub fn path_type(&self) -> Option<PathType> for PathSegment, which only return the first PathType, but there maybe more than one PathType in a PathSegment, take <i32 as std::ops::Add> for example, the AST of it is as the following:

So I think there can make a pub fn path_types(&self) -> Vec<PathType> { support::children(&self.syntax).collect() } for PathSegment to access all PathType.

Metadata

Metadata

Assignees

Labels

C-featureCategory: feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions