Skip to content

Incorrectly modifies associated type in macro body #4823

@programmerjake

Description

@programmerjake

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4d7f756328bf278741b41d51f006cf8a

Formatting:

macro_rules! m {
    () => {
        type Type;
    };
}

Incorrectly produces:

macro_rules! m {
    () => {
        type Type = impl ;
    };
}

m! is intended to be used like so:

pub trait Trait {
    m! {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions