@@ -377,7 +377,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
377
377
pub ( super ) fn type_is_sized ( & self , ty : Ty < ' tcx > ) -> bool {
378
378
// generics are weird, don't run this function on a generic
379
379
assert ! ( !ty. needs_subst( ) ) ;
380
- ty. is_sized ( self . tcx , & self . tcx . empty_parameter_environment ( ) , DUMMY_SP )
380
+ ty. is_sized ( self . tcx , ty :: ParamEnv :: empty ( ) , DUMMY_SP )
381
381
}
382
382
383
383
pub fn load_mir ( & self , instance : ty:: InstanceDef < ' tcx > ) -> EvalResult < ' tcx , & ' tcx mir:: Mir < ' tcx > > {
@@ -1914,14 +1914,14 @@ pub fn needs_drop_glue<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, t: Ty<'tcx>) -> bo
1914
1914
// returned `false` does not appear unsound. The impact on
1915
1915
// code quality is unknown at this time.)
1916
1916
1917
- let env = tcx . empty_parameter_environment ( ) ;
1918
- if !t. needs_drop ( tcx, & env) {
1917
+ let env = ty :: ParamEnv :: empty ( ) ;
1918
+ if !t. needs_drop ( tcx, env) {
1919
1919
return false ;
1920
1920
}
1921
1921
match t. sty {
1922
1922
ty:: TyAdt ( def, _) if def. is_box ( ) => {
1923
1923
let typ = t. boxed_ty ( ) ;
1924
- if !typ. needs_drop ( tcx, & env) && type_is_sized ( tcx, typ) {
1924
+ if !typ. needs_drop ( tcx, env) && type_is_sized ( tcx, typ) {
1925
1925
tcx. infer_ctxt ( ( ) , traits:: Reveal :: All ) . enter ( |infcx| {
1926
1926
let layout = t. layout ( & infcx) . unwrap ( ) ;
1927
1927
// `Box<ZeroSizeType>` does not allocate.
@@ -2038,7 +2038,7 @@ impl<'a, 'tcx> ::rustc::ty::fold::TypeFolder<'tcx, 'tcx> for AssociatedTypeNorma
2038
2038
fn type_is_sized < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , ty : Ty < ' tcx > ) -> bool {
2039
2039
// generics are weird, don't run this function on a generic
2040
2040
assert ! ( !ty. needs_subst( ) ) ;
2041
- ty. is_sized ( tcx, & tcx . empty_parameter_environment ( ) , DUMMY_SP )
2041
+ ty. is_sized ( tcx, ty :: ParamEnv :: empty ( ) , DUMMY_SP )
2042
2042
}
2043
2043
2044
2044
/// Attempts to resolve an obligation. The result is a shallow vtable resolution -- meaning that we
0 commit comments