-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
False positive unnecessary_cast on type alias to cfg-dependent type alias #8093
Comments
since #8596 |
I have |
Can this be closed now? |
Remove `#[cfg(all())]` workarounds from `c_char` Casts to type aliases are now ignored by Clippy rust-lang/rust-clippy#8596 Closes rust-lang/rust-clippy#8093
Remove `#[cfg(all())]` workarounds from `c_char` Casts to type aliases are now ignored by Clippy rust-lang/rust-clippy#8596 Closes rust-lang/rust-clippy#8093
Remove `#[cfg(all())]` workarounds from `c_char` Casts to type aliases are now ignored by Clippy rust-lang/rust-clippy#8596 Closes rust-lang/rust-clippy#8093
Summary
Closely related to #6331:
Following the fix of #6331, Clippy is correctly no longer triggering
unnecessary_cast
on0 as CfgDependent
. However the same lint is still triggered on0 as AlsoCfgDependent
in which Clippy's suggested replacement is incorrect for exactly the same reason. It would be better to transitively look through type aliases when looking for the presence of a cfg attribute.Lint Name
unnecessary_cast
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: