Skip to content

libsyntax/librustc_front: Some visitor methods don't have access to span information #28750

Closed
@petrochenkov

Description

@petrochenkov

Namely:

visit_struct_def
visit_enum_def
visit_generics
visit_arm (can use span of inner Expr, but it's bad)

+ maybe

visit_trait_ref (can use span of inner Path, acceptable)
visit_ty_param_bound (can use span of inner Lifetime or PolyTraitRef, acceptable)
visit_lifetime_def (can use span of inner Lifetime, acceptable)

So, if I want to visit, for example, a StructDef and report an error, I can't do it and have to visit all its parents instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions