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

Add MacroDef for "Macros 2.0" #16

Merged
merged 1 commit into from
Dec 16, 2020
Merged

Add MacroDef for "Macros 2.0" #16

merged 1 commit into from
Dec 16, 2020

Conversation

jonas-schievink
Copy link
Contributor

No description provided.

@matklad
Copy link
Member

matklad commented Dec 15, 2020 via email

@jonas-schievink
Copy link
Contributor Author

I was going to use that for

pub enum Macro {
    MacroRules(ast::MacroRules),
    MacroDef(ast::MacroDef),
}

but yeah, the naming isn't really ideal

@jonas-schievink
Copy link
Contributor Author

Oh, we already have parsing support for this since rust-lang/rust-analyzer#2628, so it should probably remaing MacroDef here to match the existing work

@matklad
Copy link
Member

matklad commented Dec 16, 2020

Ok, lets keep it as Def for now

bors r+

Though, it might still make sense to get rid of Def. We used to have Def suffix on everythign, but removing it a while back made the code read better.

@bors
Copy link
Contributor

bors bot commented Dec 16, 2020

Build succeeded:

@bors bors bot merged commit e250a93 into master Dec 16, 2020
@bors bors bot deleted the macros-2.0 branch December 16, 2020 08:35
bors bot added a commit to rust-lang/rust-analyzer that referenced this pull request Dec 16, 2020
6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink

This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore.

First steps for #2248.

Blocked on rust-analyzer/ungrammar#16.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants