-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
decimal constant error #1274
Comments
That's a weird one 😕 |
Oh I know, the problem is from |
It's not from a published crate, but from: https://github.com/fxbox/foxbox/blob/master/components/core/src/utils.rs#L18 |
Going to close this issue as the lint doesn't trigger anymore these days: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=458c92788f0b6472ea3f6f6bf910b3a2 |
It looks like clippy is being confused by decimal in r# strings part of a macro:
error: this is a decimal constant
--> components/core/src/utils.rs:128:55
|
128 | assert_eq!(json!([1, 100, 1000]), r#"[1,100,1000]"#);
| ^
|
note: lint level defined here
--> components/core/src/lib.rs:10:9
|
10 | #![deny(clippy)]
| ^^^^^^
help: if you mean to use a decimal constant, remove the
0
to remove confusion:| assert_eq!(json!([1, 100, 1000]), r#"[1,10,1000]"#);
help: if you mean to use an octal constant, use
0o
:| assert_eq!(json!([1, 100, 1000]), r#"[1,100o,1000]"#);
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#zero_prefixed_literal
error: aborting due to previous error
error: Could not compile
foxbox_core
.The text was updated successfully, but these errors were encountered: