You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is particularly noticeable in a sample that may use a struct and then instantiate it. I have hit this in a Linux kernel example:
#![expect(clippy::disallowed_names)]#[pin_data]structFoo{#[pin]a:Mutex<usize>,b:u32,}let foo = pin_init!(Foo{
a <- new_mutex!(42,"Foo::a"),
b:24,});
Is it intended that the lint only covers variables? If yes, should there be a disallowed_idents even if it overlaps with this one? (disallowed_types and others seem to be intended to cover particular paths that should not be used for a given reason, rather than just a name on any path; and even if those lints supported it, then it would still require repeating the name for the different entities, which would not be ideal).
If it is not intended, and disallowed_names is expanded to cover more entities:
Which entities should be covered? All identifiers? Something else?
Would it be worth renaming it to disallowed_idents or similar to be consistent?
Should it be case-insensitive (so that the default list Foo triggers the lint for e.g. a struct)? If not, should the default list be expanded to include Foo and so on?
The text was updated successfully, but these errors were encountered:
disallowed_names
complains about variables, like the lint description explains:However, it does not warn on identifiers in general:
This is particularly noticeable in a sample that may use a struct and then instantiate it. I have hit this in a Linux kernel example:
Is it intended that the lint only covers variables? If yes, should there be a
disallowed_idents
even if it overlaps with this one? (disallowed_types
and others seem to be intended to cover particular paths that should not be used for a given reason, rather than just a name on any path; and even if those lints supported it, then it would still require repeating the name for the different entities, which would not be ideal).If it is not intended, and
disallowed_names
is expanded to cover more entities:disallowed_idents
or similar to be consistent?Foo
triggers the lint for e.g. astruct
)? If not, should the default list be expanded to includeFoo
and so on?The text was updated successfully, but these errors were encountered: