Skip to content

Commit 4d2a3bb

Browse files
committed
Deny internal lints on librustc_typeck
1 parent e4b87f5 commit 4d2a3bb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/librustc_typeck/astconv.rs

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ enum GenericArgPosition {
102102
/// Dummy type used for the `Self` of a `TraitRef` created for converting
103103
/// a trait object, and which gets removed in `ExistentialTraitRef`.
104104
/// This type must not appear anywhere in other converted types.
105+
#[cfg_attr(not(stage0), allow(usage_of_ty_tykind))]
105106
const TRAIT_OBJECT_DUMMY_SELF: ty::TyKind<'static> = ty::Infer(ty::FreshTy(0));
106107

107108
impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {

src/librustc_typeck/check/wfcheck.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::constrained_generic_params::{identify_constrained_generic_params, Par
33

44
use crate::hir::def_id::DefId;
55
use rustc::traits::{self, ObligationCauseCode};
6-
use rustc::ty::{self, Lift, Ty, TyCtxt, TyKind, GenericParamDefKind, TypeFoldable, ToPredicate};
6+
use rustc::ty::{self, Lift, Ty, TyCtxt, GenericParamDefKind, TypeFoldable, ToPredicate};
77
use rustc::ty::subst::{Subst, InternalSubsts};
88
use rustc::util::nodemap::{FxHashSet, FxHashMap};
99
use rustc::mir::interpret::ConstValue;
@@ -354,7 +354,7 @@ fn check_item_type<'a, 'tcx>(
354354

355355
let mut forbid_unsized = true;
356356
if allow_foreign_ty {
357-
if let TyKind::Foreign(_) = fcx.tcx.struct_tail(item_ty).sty {
357+
if let ty::Foreign(_) = fcx.tcx.struct_tail(item_ty).sty {
358358
forbid_unsized = false;
359359
}
360360
}

src/librustc_typeck/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ This API is completely unstable and subject to change.
7171
#![recursion_limit="256"]
7272

7373
#![deny(rust_2018_idioms)]
74+
#![cfg_attr(not(stage0), deny(internal))]
7475
#![allow(explicit_outlives_requirements)]
7576

7677
#[macro_use] extern crate log;

0 commit comments

Comments
 (0)