Skip to content

Work on whitespace for find_node_at_offset_with_descend #21729

@A4-Tacks

Description

@A4-Tacks

AssistContext::find_node_at_offset_with_descend Return None on the whitespace within the macro, as the whitespace does not have descended

macro_rules! m { ($($t:tt)*) => {$($t)*} } m!(match Some(2) { None => 3, $0 });

$0 cannot descend a token on WHITESPACE, unless $0 is on the } (currently other bug #21728)

Problem

Avoid descended cases that do not contain the this whitespace, e.g
call find_node_at_offset_with_descend::<ast::WildcardPat>() on $0 _ => 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions