Merge pull request #136 from morisja/release_1_5 #876
GitHub Actions / clippy
failed
Oct 20, 2024 in 1s
clippy
2 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0-nightly (da935398d 2024-10-19)
- cargo 1.84.0-nightly (cf53cc54b 2024-10-18)
- clippy 0.1.84 (da935398d5 2024-10-19)
Annotations
Check failure on line 46 in src/protocol.rs
github-actions / clippy
non-local `impl` definition, `impl` blocks should be written at the same level as their item
error: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> src/protocol.rs:46:45
|
46 | #[derive(Clone, Copy, Debug, FromPrimitive, ToPrimitive)]
| ^----------
| |
| `ToPrimitive` is not local
| move the `impl` block outside of this constant `_IMPL_NUM_ToPrimitive_FOR_RequestType`
47 | #[allow(clippy::upper_case_acronyms)]
48 | pub enum RequestType {
| ----------- `RequestType` is not local
|
= note: the derive macro `ToPrimitive` defines the non-local `impl`, and may need to be changed
= note: the derive macro `ToPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: this error originates in the derive macro `ToPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
Check failure on line 46 in src/protocol.rs
github-actions / clippy
non-local `impl` definition, `impl` blocks should be written at the same level as their item
error: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> src/protocol.rs:46:30
|
46 | #[derive(Clone, Copy, Debug, FromPrimitive, ToPrimitive)]
| ^------------
| |
| `FromPrimitive` is not local
| move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_RequestType`
47 | #[allow(clippy::upper_case_acronyms)]
48 | pub enum RequestType {
| ----------- `RequestType` is not local
|
= note: the derive macro `FromPrimitive` defines the non-local `impl`, and may need to be changed
= note: the derive macro `FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: `-D non-local-definitions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(non_local_definitions)]`
= note: this error originates in the derive macro `FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info)
Loading