Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly modifies associated type in macro body #4823

Closed
programmerjake opened this issue May 1, 2021 · 0 comments · Fixed by #5093
Closed

Incorrectly modifies associated type in macro body #4823

programmerjake opened this issue May 1, 2021 · 0 comments · Fixed by #5093
Labels

Comments

@programmerjake
Copy link
Member

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! {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants