File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
compiler/rustc_middle/src Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -438,18 +438,6 @@ impl<'tcx> TyCtxt<'tcx> {
438
438
}
439
439
}
440
440
441
- #[ inline]
442
- pub fn optimized_mir_or_const_arg_mir (
443
- self ,
444
- def : ty:: WithOptConstParam < DefId > ,
445
- ) -> & ' tcx Body < ' tcx > {
446
- if let Some ( ( did, param_did) ) = def. as_const_arg ( ) {
447
- self . mir_for_ctfe_of_const_arg ( ( did, param_did) )
448
- } else {
449
- self . optimized_mir ( def. did )
450
- }
451
- }
452
-
453
441
#[ inline]
454
442
pub fn mir_for_ctfe_opt_const_arg ( self , def : ty:: WithOptConstParam < DefId > ) -> & ' tcx Body < ' tcx > {
455
443
if let Some ( ( did, param_did) ) = def. as_const_arg ( ) {
Original file line number Diff line number Diff line change @@ -2963,7 +2963,10 @@ impl<'tcx> TyCtxt<'tcx> {
2963
2963
| DefKind :: AnonConst => self . mir_for_ctfe_opt_const_arg ( def) ,
2964
2964
// If the caller wants `mir_for_ctfe` of a function they should not be using
2965
2965
// `instance_mir`, so we'll assume const fn also wants the optimized version.
2966
- _ => self . optimized_mir_or_const_arg_mir ( def) ,
2966
+ _ => {
2967
+ assert_eq ! ( def. const_param_did, None ) ;
2968
+ self . optimized_mir ( def. did )
2969
+ }
2967
2970
} ,
2968
2971
ty:: InstanceDef :: VtableShim ( ..)
2969
2972
| ty:: InstanceDef :: ReifyShim ( ..)
You can’t perform that action at this time.
0 commit comments