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

View File

@@ -1439,7 +1439,8 @@ class _:
"""
A path segment, which is one part of a whole path.
"""
type_repr: optional["TypeRepr"] | child | rust.detach
trait_type_repr: optional["PathTypeRepr"] | child | rust.detach
@annotate(PathTypeRepr)
@qltest.test_with(Path)