Skip to content

#[implement] yields clippy::ptr_as_ptr and clippy::borrow_as_ptr #3690

@PaulDance

Description

@PaulDance

Suggestion

Under windows 0.61.3 and Rust 1.86, using the implement macro on a type generates these two Clippy lints. Excluding them is bothersome, because it requires doing so on the entire module that contains interface implementations that most probably contain cases the lints are made for covering, thus loosing them entirely.

Would it therefore be possible to whitelist these lints in the generated code, but only for the precise locations they are triggered at? In doing so, it would be nice if expect were to be used, although it may conflict with the current MSRV. If that's not possible, then I would say prepending each allow with #[allow(clippy::allow_attributes)] should work in order to support warn-by-default configurations for this lint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions