1
Fork 0
This commit is contained in:
Oliver Schneider 2017-02-14 10:17:00 +01:00
parent ac71d6f345
commit d4da7c46dd
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9

View file

@ -11,7 +11,6 @@ use rustc::ty::layout::{self, Layout, Size};
use rustc::ty::subst::{self, Subst, Substs}; use rustc::ty::subst::{self, Subst, Substs};
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable}; use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
use rustc_data_structures::indexed_vec::Idx; use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::fx::FxHashSet;
use syntax::codemap::{self, DUMMY_SP}; use syntax::codemap::{self, DUMMY_SP};
use error::{EvalError, EvalResult}; use error::{EvalError, EvalResult};
@ -1588,7 +1587,7 @@ pub fn monomorphize_field_ty<'a, 'tcx:'a >(tcx: TyCtxt<'a, 'tcx, 'tcx>, f: &ty::
} }
pub fn is_inhabited<'a, 'tcx: 'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>) -> bool { pub fn is_inhabited<'a, 'tcx: 'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>) -> bool {
ty.uninhabited_from(&mut FxHashSet::default(), tcx).is_empty() ty.uninhabited_from(&mut HashMap::default(), tcx).is_empty()
} }
pub trait IntoValTyPair<'tcx> { pub trait IntoValTyPair<'tcx> {