File tree 2 files changed +7
-5
lines changed
compiler/rustc_middle/src/ty
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1076,11 +1076,6 @@ impl<'tcx> ParamEnv<'tcx> {
1076
1076
ty:: ParamEnv { packed : CopyTaggedPtr :: new ( caller_bounds, ParamTag { reveal } ) }
1077
1077
}
1078
1078
1079
- pub fn with_user_facing ( mut self ) -> Self {
1080
- self . packed . set_tag ( ParamTag { reveal : Reveal :: UserFacing , ..self . packed . tag ( ) } ) ;
1081
- self
1082
- }
1083
-
1084
1079
/// Returns a new parameter environment with the same clauses, but
1085
1080
/// which "reveals" the true results of projections in all cases
1086
1081
/// (even for associated types that are specializable). This is
@@ -1095,6 +1090,12 @@ impl<'tcx> ParamEnv<'tcx> {
1095
1090
return self ;
1096
1091
}
1097
1092
1093
+ // No need to reveal opaques with the new solver enabled,
1094
+ // since we have lazy norm.
1095
+ if tcx. next_trait_solver_globally ( ) {
1096
+ return ParamEnv :: new ( self . caller_bounds ( ) , Reveal :: All ) ;
1097
+ }
1098
+
1098
1099
ParamEnv :: new ( tcx. reveal_opaque_types_in_bounds ( self . caller_bounds ( ) ) , Reveal :: All )
1099
1100
}
1100
1101
Original file line number Diff line number Diff line change @@ -1751,6 +1751,7 @@ pub fn reveal_opaque_types_in_bounds<'tcx>(
1751
1751
tcx : TyCtxt < ' tcx > ,
1752
1752
val : ty:: Clauses < ' tcx > ,
1753
1753
) -> ty:: Clauses < ' tcx > {
1754
+ assert ! ( !tcx. next_trait_solver_globally( ) ) ;
1754
1755
let mut visitor = OpaqueTypeExpander {
1755
1756
seen_opaque_tys : FxHashSet :: default ( ) ,
1756
1757
expanded_cache : FxHashMap :: default ( ) ,
You can’t perform that action at this time.
0 commit comments