± cargo --version
cargo 0.19.0-nightly (03efb7fc8 2017-04-23)
± rustc --version
rustc 1.18.0-nightly (94e884b63 2017-04-27)
± cargo clippy --version
0.0.128
The following code:
assert!({ true });
triggers the following lint:
warning: you probably are missing some parameter in your format string
--> src/lib.rs:2:5
|
2 | assert!({ true });
| ^^^^^^^^^^^^^^^^^^
|
This is a false positive, because the curly braces are rust code identifiers, not format string tokens.
I use this syntax with the braces to put complex expressions inside the assert!s which should not be part of the regular code.
We should have an A-musing label
@oli-obk You can do that by yourself in Issues → Labels (on the right of the search bar).
(took me a while to find that)
xD I know, but I wasn't sure about the resonance I'd get if I start throwing around useless labels
This is now being triggered in UNIC for this assertion: https://github.com/behnam/rust-unic/blob/master/unic/ucd/age/tests/age_tests.rs#L35-L42
I think the problem is that we just get the source for the contained token tree and look there for brackets.
should be easy enough to check whether the token tree starts and ends with quotes
Most helpful comment
We should have an
A-musinglabel