/// 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 {
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;
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;
}
}
#![recursion_limit="256"]
#![deny(rust_2018_idioms)]
+#![cfg_attr(not(stage0), deny(internal))]
#![allow(explicit_outlives_requirements)]
#[macro_use] extern crate log;