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

Document flag for disabling literal replacement in macros #3

Open
Andlon opened this issue Dec 11, 2019 · 1 comment
Open

Document flag for disabling literal replacement in macros #3

Andlon opened this issue Dec 11, 2019 · 1 comment

Comments

@Andlon
Copy link
Owner

Andlon commented Dec 11, 2019

@w1th0utnam3 recently implemented support for replacing literals in macro in #2. This functionality has an "escape hatch" for disabling macro replacement, used like this:

#[replace_numeric_literals(literal as i32, visit_macros=false)]

By default, macros are visited. We need to document this behavior before we publish an updated version on Crates.io.

@w1th0utnam3
Copy link
Collaborator

Furthermore it should be documented what kind of macros are supported. Support of visiting a macro depends on its syntax. Only assert!-like (with a single expression as argument) and vec!-like (with , or ; separated expressions as arguments) are currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants