Skip to content

CamelCase warning of derive macro on client code #15541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zeenix opened this issue Sep 1, 2023 · 1 comment
Closed

CamelCase warning of derive macro on client code #15541

zeenix opened this issue Sep 1, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@zeenix
Copy link

zeenix commented Sep 1, 2023

My crate uses serde-repr and the macros it provides doesn't conform to the CamelCase convention. However, since the macros are not mine, I don't think I should be given the warning about it. Here is my code:

use serde_repr::{Deserialize_repr, Serialize_repr};

#[repr(u8)]
#[derive(Debug, Deserialize_repr, Serialize_repr)]
pub enum EndianSig {
    /// The D-Bus message is in big-endian (network) byte order.
    Big = b'B',

    /// The D-Bus message is in little-endian byte order.
    Little = b'l',
}

and it gives me:

Structure `discriminant` should have CamelCase name, e.g. `Discriminant`rust-analyzer[non_camel_case_types](https://doc.rust-lang.org/rustc/?search%3Dnon_camel_case_types)
core::fmt::macros
macro Debug
Derive macro generating an impl of the trait Debug.

cargo build , cargo check or cargo clippy don't complain about this at all so I think RA shouldn't either.

@lnicola
Copy link
Member

lnicola commented Sep 10, 2023

Duplicate of #15344.

@lnicola lnicola closed this as completed Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants