You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
That's a weird one 😕
That lint only checks for LitKind::Int.
I can't reproduce it, can you reduce it to a self-contained example? Or publish the full code that triggers that?
Oh I know, the problem is from json! but at no point we ever check for macros in that lint and we look at snippets. @fabricedesre what crate does json! come from?
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: