Add a builtin_type_shadow lint
This commit is contained in:
parent
39d4a1b323
commit
d87f137254
7 changed files with 73 additions and 3 deletions
21
clippy_lints/src/utils/constants.rs
Normal file
21
clippy_lints/src/utils/constants.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
//! This module contains some useful constants.
|
||||
|
||||
#![deny(missing_docs_in_private_items)]
|
||||
|
||||
/// List of the built-in types names.
|
||||
///
|
||||
/// See also [the reference][reference-types] for a list of such types.
|
||||
///
|
||||
/// [reference-types]: https://doc.rust-lang.org/reference.html#types
|
||||
pub const BUILTIN_TYPES: &'static [&'static str] = &[
|
||||
"i8", "u8",
|
||||
"i16", "u16",
|
||||
"i32", "u32",
|
||||
"i64", "u64",
|
||||
"isize", "usize",
|
||||
"f32",
|
||||
"f64",
|
||||
"bool",
|
||||
"str",
|
||||
"char",
|
||||
];
|
||||
|
|
@ -22,6 +22,7 @@ use syntax::ptr::P;
|
|||
pub mod cargo;
|
||||
pub mod comparisons;
|
||||
pub mod conf;
|
||||
pub mod constants;
|
||||
mod hir;
|
||||
pub mod paths;
|
||||
pub mod sugg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue