Remove unused function

This commit is contained in:
Oliver Schneider 2018-01-26 15:28:45 +01:00 committed by Oliver Schneider
parent 0e2da01b91
commit b38e8af5eb
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9

View file

@ -18,19 +18,6 @@ use syntax::ast;
use rustc_const_math::*;
/// * `DefId` is the id of the constant.
/// * `Substs` is the monomorphized substitutions for the expression.
pub fn lookup_const_by_id<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
key: ty::ParamEnvAnd<'tcx, (DefId, &'tcx Substs<'tcx>)>)
-> Option<(DefId, &'tcx Substs<'tcx>)> {
ty::Instance::resolve(
tcx,
key.param_env,
key.value.0,
key.value.1,
).map(|instance| (instance.def_id(), instance.substs))
}
pub fn lit_to_const<'a, 'tcx>(lit: &'tcx ast::LitKind,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,