File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 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> {
10761076 ty:: ParamEnv { packed : CopyTaggedPtr :: new ( caller_bounds, ParamTag { reveal } ) }
10771077 }
10781078
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-
10841079 /// Returns a new parameter environment with the same clauses, but
10851080 /// which "reveals" the true results of projections in all cases
10861081 /// (even for associated types that are specializable). This is
@@ -1095,6 +1090,12 @@ impl<'tcx> ParamEnv<'tcx> {
10951090 return self ;
10961091 }
10971092
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+
10981099 ParamEnv :: new ( tcx. reveal_opaque_types_in_bounds ( self . caller_bounds ( ) ) , Reveal :: All )
10991100 }
11001101
Original file line number Diff line number Diff line change @@ -1751,6 +1751,7 @@ pub fn reveal_opaque_types_in_bounds<'tcx>(
17511751 tcx : TyCtxt < ' tcx > ,
17521752 val : ty:: Clauses < ' tcx > ,
17531753) -> ty:: Clauses < ' tcx > {
1754+ assert ! ( !tcx. next_trait_solver_globally( ) ) ;
17541755 let mut visitor = OpaqueTypeExpander {
17551756 seen_opaque_tys : FxHashSet :: default ( ) ,
17561757 expanded_cache : FxHashMap :: default ( ) ,
You can’t perform that action at this time.
0 commit comments