Deny rustc internal lints

This commit is contained in:
flip1995 2019-04-15 13:05:25 +02:00
parent 5361b842d1
commit 445fa3b529
No known key found for this signature in database
GPG Key ID: 01C836B640FFDFB1
3 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@
#![allow(clippy::missing_docs_in_private_items)]
#![recursion_limit = "256"]
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
#![deny(internal)]
#![feature(crate_visibility_modifier)]
// FIXME: switch to something more ergonomic here, once available.

View File

@ -9,7 +9,7 @@
use rustc::hir::def::CtorKind;
use rustc::hir::*;
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_errors::Applicability;
use std::cmp::Ordering;
@ -500,7 +500,7 @@ fn check_wild_enum_match(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
// already covered.
let mut missing_variants = vec![];
if let TyKind::Adt(def, _) = ty.sty {
if let ty::Adt(def, _) = ty.sty {
for variant in &def.variants {
missing_variants.push(variant);
}

View File

@ -1,3 +1,4 @@
#![allow(default_hash_types)]
use std::borrow::Cow;
use std::cmp::Ordering;