@@ -282,12 +282,12 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
282282 }
283283 }
284284
285- pub fn monomorphize_in_frame < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
285+ pub ( super ) fn monomorphize < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
286286 & self ,
287287 t : T ,
288288 ) -> EvalResult < ' tcx , T > {
289289 match self . stack . last ( ) {
290- Some ( frame) => Ok ( self . monomorphize ( t, frame. instance . substs ) ) ,
290+ Some ( frame) => Ok ( self . monomorphize_with_substs ( t, frame. instance . substs ) ) ,
291291 None => if t. needs_subst ( ) {
292292 err ! ( TooGeneric ) . into ( )
293293 } else {
@@ -296,7 +296,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
296296 }
297297 }
298298
299- pub fn monomorphize < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
299+ fn monomorphize_with_substs < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
300300 & self ,
301301 t : T ,
302302 substs : & ' tcx Substs < ' tcx >
@@ -315,7 +315,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
315315 let cell = & frame. local_layouts [ local] ;
316316 if cell. get ( ) . is_none ( ) {
317317 let local_ty = frame. mir . local_decls [ local] . ty ;
318- let local_ty = self . monomorphize ( local_ty, frame. instance . substs ) ;
318+ let local_ty = self . monomorphize_with_substs ( local_ty, frame. instance . substs ) ;
319319 let layout = self . layout_of ( local_ty) ?;
320320 cell. set ( Some ( layout) ) ;
321321 }
0 commit comments