Rust: fix <X as Y> path extraction

This works around a quirk in rust-analyzer's AST generation machinery,
where for an `<X as Y>` path there might be no way to directly get `Y`
from the path segment.
This commit is contained in:
Paolo Tranquilli
2025-02-24 10:34:33 +01:00
parent 1b2d842b44
commit 689e7b8440
24 changed files with 290 additions and 289 deletions

2
rust/schema/ast.py generated
View File

@@ -492,10 +492,8 @@ class PathSegment(AstNode, ):
generic_arg_list: optional["GenericArgList"] | child
name_ref: optional["NameRef"] | child
parenthesized_arg_list: optional["ParenthesizedArgList"] | child
path_type: optional["PathTypeRepr"] | child
ret_type: optional["RetTypeRepr"] | child
return_type_syntax: optional["ReturnTypeSyntax"] | child
type_repr: optional["TypeRepr"] | child
class PathTypeRepr(TypeRepr, ):
path: optional["Path"] | child