@@ -54,7 +54,7 @@ struct CheckStaticVisitor<'a, 'tcx: 'a> {
5454}
5555
5656struct GlobalVisitor < ' a , ' b , ' tcx : ' a +' b > (
57- euv:: ExprUseVisitor < ' a , ' b , ' tcx , ty:: ctxt < ' tcx > > ) ;
57+ euv:: ExprUseVisitor < ' a , ' b , ' tcx , ty:: ParameterEnvironment < ' b , ' tcx > > ) ;
5858struct GlobalChecker {
5959 static_consumptions : NodeSet ,
6060 const_borrows : NodeSet ,
@@ -70,8 +70,8 @@ pub fn check_crate(tcx: &ty::ctxt) {
7070 static_local_borrows : NodeSet :: new ( ) ,
7171 } ;
7272 {
73- let param_env = ty:: empty_parameter_environment ( ) ;
74- let visitor = euv:: ExprUseVisitor :: new ( & mut checker, tcx , & param_env) ;
73+ let param_env = ty:: empty_parameter_environment ( tcx ) ;
74+ let visitor = euv:: ExprUseVisitor :: new ( & mut checker, & param_env) ;
7575 visit:: walk_crate ( & mut GlobalVisitor ( visitor) , tcx. map . krate ( ) ) ;
7676 }
7777 visit:: walk_crate ( & mut CheckStaticVisitor {
@@ -121,8 +121,8 @@ impl<'a, 'tcx> CheckStaticVisitor<'a, 'tcx> {
121121 let mut fulfill_cx = traits:: FulfillmentContext :: new ( ) ;
122122 let cause = traits:: ObligationCause :: new ( e. span , e. id , traits:: SharedStatic ) ;
123123 fulfill_cx. register_builtin_bound ( & infcx, ty, ty:: BoundSync , cause) ;
124- let env = ty:: empty_parameter_environment ( ) ;
125- match fulfill_cx. select_all_or_error ( & infcx, & env, self . tcx ) {
124+ let env = ty:: empty_parameter_environment ( self . tcx ) ;
125+ match fulfill_cx. select_all_or_error ( & infcx, & env) {
126126 Ok ( ( ) ) => { } ,
127127 Err ( ref errors) => {
128128 traits:: report_fulfillment_errors ( & infcx, errors) ;
0 commit comments