Rustup to rustc 1.19.0-nightly (5b13bff52 2017-05-23)

This commit is contained in:
Oliver Schneider 2017-05-24 14:19:30 +02:00
parent 9ceb01bc73
commit ff873cc900
2 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
let fn_def_id = cx.tcx.hir.local_def_id(node_id);
let preds: Vec<ty::Predicate> = {
let parameter_env = cx.tcx.parameter_environment(fn_def_id);
let parameter_env = cx.tcx.param_env(fn_def_id);
traits::elaborate_predicates(cx.tcx, parameter_env.caller_bounds.to_vec())
.filter(|p| !p.is_global())
.collect()

View File

@ -787,7 +787,7 @@ pub fn same_tys<'a, 'tcx>(
b: ty::Ty<'tcx>,
parameter_item: DefId
) -> bool {
let parameter_env = cx.tcx.parameter_environment(parameter_item);
let parameter_env = cx.tcx.param_env(parameter_item);
cx.tcx.infer_ctxt(parameter_env, Reveal::All).enter(|infcx| {
let substs = Substs::identity_for_item(cx.tcx, parameter_item);
let new_a = a.subst(infcx.tcx, substs);
@ -807,8 +807,8 @@ pub fn type_is_unsafe_function(ty: ty::Ty) -> bool {
pub fn is_copy<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>, env: DefId) -> bool {
let substs = Substs::identity_for_item(cx.tcx, env);
let env = cx.tcx.parameter_environment(env);
!ty.subst(cx.tcx, substs).moves_by_default(cx.tcx.global_tcx(), &env, DUMMY_SP)
let env = cx.tcx.param_env(env);
!ty.subst(cx.tcx, substs).moves_by_default(cx.tcx.global_tcx(), env, DUMMY_SP)
}
/// Return whether a pattern is refutable.