Skip to content

Lint against calling intrinsics that have stable or safe wrappers #2997

Open
@dtolnay

Description

@dtolnay

There are some intrinsics that there should be no reason to call. For example core::intrinsics::size_of. This intrinsic is exposed by the safe function core::mem::size_of which should always be called instead.

I would like to suggest a Clippy lint that notices calls to no-reason-to-call intrinsics and recommends the right stable or safe wrapper to call instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-suggestionLint: Improving, adding or fixing lint suggestionsL-unnecessaryLint: Warn about unnecessary codegood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions