We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9f1e1c commit 09978bdCopy full SHA for 09978bd
compiler/rustc_middle/src/ty/layout.rs
@@ -2478,9 +2478,10 @@ impl<'tcx> ty::Instance<'tcx> {
2478
// `src/test/ui/polymorphization/normalized_sig_types.rs`), and codegen not keeping
2479
// track of a polymorphization `ParamEnv` to allow normalizing later.
2480
let mut sig = match *ty.kind() {
2481
- ty::FnDef(def_id, substs) => tcx
+ ty::FnDef(def_id, substs) if tcx.sess.opts.debugging_opts.polymorphize => tcx
2482
.normalize_erasing_regions(tcx.param_env(def_id), tcx.fn_sig(def_id))
2483
.subst(tcx, substs),
2484
+ ty::FnDef(def_id, substs) => tcx.fn_sig(def_id).subst(tcx, substs),
2485
_ => unreachable!(),
2486
};
2487
0 commit comments