Rust: Resolve as paths to trait

This commit is contained in:
Simon Friis Vindum
2026-02-02 16:02:27 +01:00
parent 8de37fec17
commit d0e30d19c4
5 changed files with 35 additions and 16 deletions

View File

@@ -1556,7 +1556,8 @@ private class PathExtPath extends PathExt instanceof Path {
tree.hasPath() and
this = getAUseTreeUseTree(tree).getPath().getQualifier*()
) and
name = Path.super.getText()
// For a `<Type as Trait>` path we resolve the trait name
name = [Path.super.getText(), Path.super.getSegment().getTraitTypeRepr().getPath().getText()]
}
override Path getQualifier() { result = Path.super.getQualifier() }