feat: support default value for set (#246) #671
clippy
43 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 43 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.0-nightly (d84b90375 2024-05-19)
- cargo 1.80.0-nightly (0de7f2ec6 2024-05-17)
- clippy 0.1.80 (d84b903 2024-05-19)
Annotations
Check warning on line 176 in pilota-build/src/middle/context.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> pilota-build/src/middle/context.rs:176:13
|
176 | self.location_map = location_map.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.location_map.clone_from(&location_map)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 60 in pilota-build/src/ir/mod.rs
github-actions / clippy
struct `ExceptionVariant` is never constructed
warning: struct `ExceptionVariant` is never constructed
--> pilota-build/src/ir/mod.rs:60:12
|
60 | pub struct ExceptionVariant {
| ^^^^^^^^^^^^^^^^
|
= note: `ExceptionVariant` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
Check warning on line 14 in pilota-build/src/index.rs
github-actions / clippy
method `increment_by` is never used
warning: method `increment_by` is never used
--> pilota-build/src/index.rs:14:8
|
3 | pub trait Idx: Sized + Copy + 'static {
| --- method in this trait
...
14 | fn increment_by(&mut self, amount: usize) {
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 67 in pilota/src/prost/mod.rs
github-actions / clippy
usage of a legacy numeric method
warning: usage of a legacy numeric method
--> pilota/src/prost/mod.rs:67:24
|
67 | if length > usize::max_value() as u64 {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
67 | if length > usize::MAX as u64 {
| ~~~
Check warning on line 9 in pilota/src/prost/encoding.rs
github-actions / clippy
importing legacy numeric constants
warning: importing legacy numeric constants
--> pilota/src/prost/encoding.rs:9:55
|
9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize};
| ^^^^^
|
= help: remove this import
= note: then `usize::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
Check warning on line 9 in pilota/src/prost/encoding.rs
github-actions / clippy
importing legacy numeric constants
warning: importing legacy numeric constants
--> pilota/src/prost/encoding.rs:9:50
|
9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize};
| ^^^
|
= help: remove this import
= note: then `u32::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
Check warning on line 4 in pilota/src/prost/message.rs
github-actions / clippy
importing legacy numeric constants
warning: importing legacy numeric constants
--> pilota/src/prost/message.rs:4:24
|
4 | use core::{fmt::Debug, usize};
| ^^^^^
|
= help: remove this import
= note: then `usize::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:192:17
|
192 | assert_remaining!(self.buf().remaining() >= 16);
| ----------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:192:17
|
192 | assert_remaining!(self.buf().remaining() >= 16);
| ----------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:187:17
|
187 | assert_remaining!(self.buf().remaining() >= length as usize);
| ------------------------------------------------------------ in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:187:17
|
187 | assert_remaining!(self.buf().remaining() >= length as usize);
| ------------------------------------------------------------ in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:181:17
|
181 | assert_remaining!(self.buf().remaining() >= 8);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:181:17
|
181 | assert_remaining!(self.buf().remaining() >= 8);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:176:17
|
176 | assert_remaining!(self.buf().remaining() >= 8);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:176:17
|
176 | assert_remaining!(self.buf().remaining() >= 8);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:171:17
|
171 | assert_remaining!(self.buf().remaining() >= 4);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:171:17
|
171 | assert_remaining!(self.buf().remaining() >= 4);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:166:17
|
166 | assert_remaining!(self.buf().remaining() >= 2);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:166:17
|
166 | assert_remaining!(self.buf().remaining() >= 2);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:161:17
|
161 | assert_remaining!(self.buf().remaining() >= 1);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:161:17
|
161 | assert_remaining!(self.buf().remaining() >= 1);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:156:17
|
156 | assert_remaining!(self.buf().remaining() >= 1);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
|
::: pilota/src/thrift/mod.rs:156:17
|
156 | assert_remaining!(self.buf().remaining() >= 1);
| ---------------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 79 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:79:15
|
79 | #[cfg(feature = "unstable")]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
...
370 | assert_remaining!(self.remaining() >= 1);
| ---------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 75 in pilota/src/thrift/rw_ext.rs
github-actions / clippy
unexpected `cfg` condition value: `unstable`
warning: unexpected `cfg` condition value: `unstable`
--> pilota/src/thrift/rw_ext.rs:75:19
|
75 | #[cfg(not(feature = "unstable"))]
| ^^^^^^^^^^^^^^^^^^^^ help: remove the condition
...
370 | assert_remaining!(self.remaining() >= 1);
| ---------------------------------------- in this macro invocation
|
= note: no expected values for `feature`
= help: consider adding `unstable` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
= note: this warning originates in the macro `assert_remaining` (in Nightly builds, run with -Z macro-backtrace for more info)