Open Erigara opened 1 year ago
Potential dup of #10417, #11132
The arithmetic_side_effects
warning will be fixed by #10203
The arithmetic_side_effects
fp is indeed fixed now.
Clippy still emits a redundant_pub_crate
lint for this repro though:
$ cargo +nightly clippy --version
clippy 0.1.77 (190f4c9 2024-01-09)
$ cargo +nightly clippy
Checking aboba v0.1.0 (/tmp/tmp.tiKPmRlfI0/aboba)
error: pub(crate) enum inside private module
--> src/main.rs:10:9
|
10 | / tokio::select! {
11 | | Some(()) = receiver.recv() => {}
12 | | else => break,
13 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
note: the lint level is defined here
--> src/main.rs:1:42
|
1 | #![deny(clippy::arithmetic_side_effects, clippy::redundant_pub_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the macro `$crate::select_priv_declare_output_enum` which comes from the expansion of the macro `tokio::select` (in Nightly builds, run with -Z macro-backtrace for more info)
error: pub(crate) type alias inside private module
--> src/main.rs:10:9
|
10 | / tokio::select! {
11 | | Some(()) = receiver.recv() => {}
12 | | else => break,
13 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
= note: this error originates in the macro `$crate::select_priv_declare_output_enum` which comes from the expansion of the macro `tokio::select` (in Nightly builds, run with -Z macro-backtrace for more info)
Summary
arithmetic_side_effects and redundant_pub_crate currently warns on code generated by external macros (in my case
tokio::select!
).Lint Name
arithmetic_side_effects, redundant_pub_crate
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: compile without errors.
Version
Additional Labels
No response