diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs index 3c813dffb0a..6bb3c380234 100644 --- a/src/librustc/middle/expr_use_visitor.rs +++ b/src/librustc/middle/expr_use_visitor.rs @@ -241,9 +241,9 @@ impl OverloadedCallType { // mem_categorization, it requires a TYPER, which is a type that // supplies types from the tree. After type checking is complete, you // can just use the tcx as the typer. -pub struct ExprUseVisitor<'d, 'a, 'gcx: 'a+'tcx, 'tcx:'a+'d> { +pub struct ExprUseVisitor<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { mc: mc::MemCategorizationContext<'a, 'gcx, 'tcx>, - delegate: &'d mut Delegate<'tcx>, + delegate: &'a mut Delegate<'tcx>, } // If the TYPER results in an error, it's because the type check @@ -271,8 +271,8 @@ enum PassArgs { ByRef, } -impl<'d, 'a, 'tcx> ExprUseVisitor<'d, 'a, 'tcx, 'tcx> { - pub fn new(delegate: &'d mut (Delegate<'tcx>+'d), +impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx, 'tcx> { + pub fn new(delegate: &'a mut (Delegate<'tcx>+'a), infcx: &'a InferCtxt<'a, 'tcx, 'tcx>) -> Self { ExprUseVisitor { diff --git a/src/librustc_passes/consts.rs b/src/librustc_passes/consts.rs index f3e13fde04b..80a4e421e34 100644 --- a/src/librustc_passes/consts.rs +++ b/src/librustc_passes/consts.rs @@ -87,8 +87,8 @@ impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> { r } - fn with_euv<'b, F, R>(&'b mut self, item_id: Option, f: F) -> R where - F: for<'c> FnOnce(&mut euv::ExprUseVisitor<'c, 'c, 'tcx, 'tcx>) -> R, + fn with_euv(&mut self, item_id: Option, f: F) -> R where + F: for<'b> FnOnce(&mut euv::ExprUseVisitor<'b, 'tcx, 'tcx>) -> R, { let param_env = match item_id { Some(item_id) => ty::ParameterEnvironment::for_item(self.tcx, item_id),