]> git.lizzy.rs Git - rust.git/commitdiff
extend polymorphization hack comment.
authorlcnr <rust@lcnr.de>
Mon, 19 Sep 2022 09:44:29 +0000 (11:44 +0200)
committerlcnr <rust@lcnr.de>
Mon, 19 Sep 2022 09:44:29 +0000 (11:44 +0200)
compiler/rustc_middle/src/ty/layout.rs

index b53ec21b7644eb58bc6d1b019916fdefa895aff0..cc820d9eb2d9e1c366132ddc5689523ee83b2c49 100644 (file)
@@ -2767,6 +2767,8 @@ fn fn_sig_for_fn_abi(
                 // (i.e. due to being inside a projection that got normalized, see
                 // `src/test/ui/polymorphization/normalized_sig_types.rs`), and codegen not keeping
                 // track of a polymorphization `ParamEnv` to allow normalizing later.
+                //
+                // We normalize the `fn_sig` again after substituting at a later point.
                 let mut sig = match *ty.kind() {
                     ty::FnDef(def_id, substs) => tcx
                         .bound_fn_sig(def_id)