@@ -282,12 +282,12 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
282
282
}
283
283
}
284
284
285
- pub fn monomorphize_in_frame < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
285
+ pub ( super ) fn monomorphize < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
286
286
& self ,
287
287
t : T ,
288
288
) -> EvalResult < ' tcx , T > {
289
289
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 ) ) ,
291
291
None => if t. needs_subst ( ) {
292
292
err ! ( TooGeneric ) . into ( )
293
293
} else {
@@ -296,7 +296,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
296
296
}
297
297
}
298
298
299
- pub fn monomorphize < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
299
+ fn monomorphize_with_substs < T : TypeFoldable < ' tcx > + Subst < ' tcx > > (
300
300
& self ,
301
301
t : T ,
302
302
substs : & ' tcx Substs < ' tcx >
@@ -315,7 +315,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
315
315
let cell = & frame. local_layouts [ local] ;
316
316
if cell. get ( ) . is_none ( ) {
317
317
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 ) ;
319
319
let layout = self . layout_of ( local_ty) ?;
320
320
cell. set ( Some ( layout) ) ;
321
321
}
0 commit comments