about summary refs log tree commit diff
diff options
context:
space:
mode:
authorb-naber <bn263@gmx.de>2021-12-01 00:20:57 +0100
committerb-naber <bn263@gmx.de>2021-12-01 12:12:40 +0100
commit4d9a0bf21b5429c9e3d08b4a735c40d60114ba5f (patch)
tree5ca0c2e410f0a65897d1dd1ea873fcef0cacd930
parent84bcd40927d0547d36df8f6419b4d060c8c5a840 (diff)
downloadrust-4d9a0bf21b5429c9e3d08b4a735c40d60114ba5f.tar.gz
rust-4d9a0bf21b5429c9e3d08b4a735c40d60114ba5f.zip
address review
-rw-r--r--compiler/rustc_middle/src/query/mod.rs5
-rw-r--r--compiler/rustc_middle/src/ty/layout.rs4
-rw-r--r--src/librustdoc/html/render/print_item.rs2
3 files changed, 10 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 8c1ffa1be3a..8667a6bea11 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -1644,6 +1644,11 @@ rustc_queries! {
         desc { "normalizing `{:?}`", goal }
     }
 
+    // FIXME: Implement `normalize_generic_arg_after_erasing_regions` and
+    // `normalize_mir_const_after_erasing_regions` in terms of
+    // `try_normalize_generic_arg_after_erasing_regions` and
+    // `try_normalize_mir_const_after_erasing_regions`, respectively.
+
     /// Do not call this query directly: invoke `normalize_erasing_regions` instead.
     query normalize_generic_arg_after_erasing_regions(
         goal: ParamEnvAnd<'tcx, GenericArg<'tcx>>
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
index 9c1407de812..57506bc6834 100644
--- a/compiler/rustc_middle/src/ty/layout.rs
+++ b/compiler/rustc_middle/src/ty/layout.rs
@@ -240,6 +240,10 @@ fn layout_of<'tcx>(
             let param_env = param_env.with_reveal_all_normalized(tcx);
             let unnormalized_ty = ty;
 
+            // FIXME: We might want to have two different versions of `layout_of`:
+            // One that can be called after typecheck has completed and can use
+            // `normalize_erasing_regions` here and another one that can be called
+            // before typecheck has completed and uses `try_normalize_erasing_regions`.
             let ty = match tcx.try_normalize_erasing_regions(param_env, ty) {
                 Ok(t) => t,
                 Err(normalization_error) => {
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 48dd69155ce..62fdec15af4 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -1773,7 +1773,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
             writeln!(
                 w,
                 "<p><strong>Note:</strong> Encountered an error during type layout; \
-                the type was not normalizable.</p>"
+                the type failed to be normalized.</p>"
             )
         }
     }