Skip to content

[Feat]: Add a method to get the parent node of a given node #242

@xFrednet

Description

@xFrednet

Summary

Requesting the parent of a given node, is a fundamental feature required to build context-sensitive lints. It's useful to check the context that an expression occurs in or to adapt the suggestion when required. Rustc provides a find_parent(HirId) function and an iterator function to walk through the parents.

I've already planned a bit for this issue, and it's surprisingly complex. It might take some time to implement it properly and feedback from the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-apiArea: Stable APIC-enhancementCategory: New feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions