Skip to content

Op followed by comment should not be considered joint #62

@dtolnay

Description

@dtolnay
for tt in "~// comment".parse::<TokenStream>().unwrap() {
    println!("{:?}", tt);
}

Proc-macro:

Op(Op { op: '~', spacing: Alone, span: Span(...) })

Proc-macro2:

Op(Op { op: '~', spacing: Joint, span: Span })

The comment should be considered whitespace, making the preceding op alone rather than joint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions