]> git.lizzy.rs Git - rust.git/commitdiff
Deny internal lints on librustc_typeck
authorflip1995 <hello@philkrones.com>
Sun, 31 Mar 2019 22:10:48 +0000 (00:10 +0200)
committerflip1995 <hello@philkrones.com>
Wed, 3 Apr 2019 17:18:07 +0000 (19:18 +0200)
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/wfcheck.rs
src/librustc_typeck/lib.rs

index fba4414c1275c88237c39a8aa05f34ca33a76464..fba6a607eef06bc6d57e808f480cbe17508432b5 100644 (file)
@@ -102,6 +102,7 @@ enum GenericArgPosition {
 /// Dummy type used for the `Self` of a `TraitRef` created for converting
 /// a trait object, and which gets removed in `ExistentialTraitRef`.
 /// This type must not appear anywhere in other converted types.
+#[cfg_attr(not(stage0), allow(usage_of_ty_tykind))]
 const TRAIT_OBJECT_DUMMY_SELF: ty::TyKind<'static> = ty::Infer(ty::FreshTy(0));
 
 impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
index 3579810b8d75f68abd472aa63bb8306144d00e8d..d108e7c3107afdde3fa02294f7979fa5e63d21b6 100644 (file)
@@ -3,7 +3,7 @@
 
 use crate::hir::def_id::DefId;
 use rustc::traits::{self, ObligationCauseCode};
-use rustc::ty::{self, Lift, Ty, TyCtxt, TyKind, GenericParamDefKind, TypeFoldable, ToPredicate};
+use rustc::ty::{self, Lift, Ty, TyCtxt, GenericParamDefKind, TypeFoldable, ToPredicate};
 use rustc::ty::subst::{Subst, InternalSubsts};
 use rustc::util::nodemap::{FxHashSet, FxHashMap};
 use rustc::mir::interpret::ConstValue;
@@ -354,7 +354,7 @@ fn check_item_type<'a, 'tcx>(
 
         let mut forbid_unsized = true;
         if allow_foreign_ty {
-            if let TyKind::Foreign(_) = fcx.tcx.struct_tail(item_ty).sty {
+            if let ty::Foreign(_) = fcx.tcx.struct_tail(item_ty).sty {
                 forbid_unsized = false;
             }
         }
index 1fa16352b867ad0609d96fc3274ca01aa624d47b..4a7b1e67366e8359a389e7fa83a1504bb2a24776 100644 (file)
@@ -71,6 +71,7 @@
 #![recursion_limit="256"]
 
 #![deny(rust_2018_idioms)]
+#![cfg_attr(not(stage0), deny(internal))]
 #![allow(explicit_outlives_requirements)]
 
 #[macro_use] extern crate log;