numeric_literals icon indicating copy to clipboard operation
numeric_literals copied to clipboard

Document flag for disabling literal replacement in macros

Open Andlon opened this issue 5 years ago • 1 comments

@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.

Andlon avatar Dec 11 '19 16:12 Andlon

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.

w1th0utnam3 avatar Dec 11 '19 16:12 w1th0utnam3