Deny rustc internal lints
This commit is contained in:
parent
5361b842d1
commit
445fa3b529
@ -8,6 +8,7 @@
|
|||||||
#![allow(clippy::missing_docs_in_private_items)]
|
#![allow(clippy::missing_docs_in_private_items)]
|
||||||
#![recursion_limit = "256"]
|
#![recursion_limit = "256"]
|
||||||
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
|
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
|
||||||
|
#![deny(internal)]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
|
|
||||||
// FIXME: switch to something more ergonomic here, once available.
|
// FIXME: switch to something more ergonomic here, once available.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
use rustc::hir::def::CtorKind;
|
use rustc::hir::def::CtorKind;
|
||||||
use rustc::hir::*;
|
use rustc::hir::*;
|
||||||
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
||||||
use rustc::ty::{self, Ty, TyKind};
|
use rustc::ty::{self, Ty};
|
||||||
use rustc::{declare_tool_lint, lint_array};
|
use rustc::{declare_tool_lint, lint_array};
|
||||||
use rustc_errors::Applicability;
|
use rustc_errors::Applicability;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
@ -500,7 +500,7 @@ fn check_wild_enum_match(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
|
|||||||
// already covered.
|
// already covered.
|
||||||
|
|
||||||
let mut missing_variants = vec![];
|
let mut missing_variants = vec![];
|
||||||
if let TyKind::Adt(def, _) = ty.sty {
|
if let ty::Adt(def, _) = ty.sty {
|
||||||
for variant in &def.variants {
|
for variant in &def.variants {
|
||||||
missing_variants.push(variant);
|
missing_variants.push(variant);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#![allow(default_hash_types)]
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
Loading…
Reference in New Issue
Block a user