Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Pattern macros are not supported #20

Open
dtolnay opened this issue Mar 19, 2018 · 0 comments
Open

Pattern macros are not supported #20

dtolnay opened this issue Mar 19, 2018 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented Mar 19, 2018

Rust macro_rules macros can be expanded in pattern position:

macro_rules! zero {
    () => { 0 }
}

fn main() {
    if let zero!() = 0 {}
}

This is not possible with proc-macro-hack.

Repository owner deleted a comment from BrandonDyer64 Apr 4, 2020
Repository owner locked and limited conversation to collaborators Apr 4, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant