Skip to content

Binary operator can duplicate itself in certain situations in a macro #2290

@sugar700

Description

@sugar700

Example code:

m!(a: b!(c!) % f);

Is formatted into:

m!(a: b!(c!) % % f);

Which is not identical.

Noticed with https://github.com/xfix/advent-of-code-2017/blob/master/day18/src/main.rs with >> operator, and simplified.

This happens on playpen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: macros (procedural macros, macro_rules! macros, etc.)C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions