Add several lints into unused lint group

Remove a couple of obsolete lints
This commit is contained in:
Vadim Petrochenkov 2017-10-21 00:00:57 +03:00
parent 690ff04594
commit bf0cdb52f2
22 changed files with 53 additions and 55 deletions

View file

@ -47,6 +47,7 @@
#![feature(core_intrinsics)]
#![feature(i128_type)]
#![cfg_attr(windows, feature(libc))]
#![feature(macro_vis_matcher)]
#![feature(never_type)]
#![feature(nonzero)]
#![feature(quote)]

View file

@ -106,12 +106,6 @@ declare_lint! {
"unknown crate type found in #[crate_type] directive"
}
declare_lint! {
pub FAT_PTR_TRANSMUTES,
Allow,
"detects transmutes of fat pointers"
}
declare_lint! {
pub TRIVIAL_CASTS,
Allow,
@ -250,7 +244,6 @@ impl LintPass for HardwiredLints {
UNUSED_FEATURES,
STABLE_FEATURES,
UNKNOWN_CRATE_TYPES,
FAT_PTR_TRANSMUTES,
TRIVIAL_CASTS,
TRIVIAL_NUMERIC_CASTS,
PRIVATE_IN_PUBLIC,

View file

@ -84,29 +84,16 @@ impl Lint {
}
}
/// Build a `Lint` initializer.
#[macro_export]
macro_rules! lint_initializer {
($name:ident, $level:ident, $desc:expr) => (
::rustc::lint::Lint {
name: stringify!($name),
default_level: ::rustc::lint::$level,
desc: $desc,
}
)
}
/// Declare a static item of type `&'static Lint`.
#[macro_export]
macro_rules! declare_lint {
(pub $name:ident, $level:ident, $desc:expr) => (
pub static $name: &'static ::rustc::lint::Lint
= &lint_initializer!($name, $level, $desc);
);
($name:ident, $level:ident, $desc:expr) => (
static $name: &'static ::rustc::lint::Lint
= &lint_initializer!($name, $level, $desc);
);
($vis: vis $NAME: ident, $Level: ident, $desc: expr) => (
$vis static $NAME: &$crate::lint::Lint = &$crate::lint::Lint {
name: stringify!($NAME),
default_level: $crate::lint::$Level,
desc: $desc
};
)
}
/// Declare a static `LintArray` and return it as an expression.