Skip to content

Merge pull request #137 from morisja/rustfmt

Sign in for the full log view
GitHub Actions / clippy failed Oct 12, 2024 in 0s

clippy

2 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 0
Note 0
Help 0

Versions

  • rustc 1.83.0-nightly (1bc403daa 2024-10-11)
  • cargo 1.83.0-nightly (15fbd2f60 2024-10-08)
  • clippy 0.1.83 (1bc403d 2024-10-11)

Annotations

Check failure on line 46 in src/protocol.rs

See this annotation in the file changed.

@github-actions 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 lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = 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

See this annotation in the file changed.

@github-actions 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: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = 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)