rust-lang/rust-clippy

Lint against calling intrinsics that have stable or safe wrappers

Open

#2.997 geöffnet am 3. Aug. 2018

Auf GitHub ansehen
 (8 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
A-lintL-suggestionL-unnecessarygood first issue

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide