We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a derive macro that generates new types based off the variant names of an enum, so for the enum:
enum
pub enum Enum1 { A, }
it generates code like so:
#[allow(non_snake_case)] #[allow(non_camel_case_types)] #[allow(non_upper_case_globals)] mod __Enum1__impl_Value { #![no_implicit_prelude] use super::*; const __Enum1_A_discriminant__: isize = 0; // ... pub struct __Enum1_A_field_values__<'ctx>( pub ::core::marker::PhantomData<(Enum1, &'ctx ())>, ); // ... pub struct __StructOfVariantValues<'ctx> { pub A: __Enum1_A_field_values__<'ctx>, pub __aggregate_phantom: ::core::marker::PhantomData<(Enum1, &'ctx ())>, } // ... }
This causes rust-analyzer to generate a bunch of incorrect quick fixes like:
Structure `__Enum1_A_field_values__` should have CamelCase name, e.g. `Enum1AFieldValues` rust-analyzer(incorrect-ident-case)
and:
Field `A` should have snake_case name, e.g. `a` rust-analyzer(incorrect-ident-case)
The text was updated successfully, but these errors were encountered:
Probably a duplicate of #8747.
Sorry, something went wrong.
no_snake_case
#[derive(Row)]
No branches or pull requests
I have a derive macro that generates new types based off the variant names of an
enum
, so for the enum:it generates code like so:
This causes rust-analyzer to generate a bunch of incorrect quick fixes like:
and:
The text was updated successfully, but these errors were encountered: