Skip to content

Commit 4d9a0bf

Browse files
committed
address review
1 parent 84bcd40 commit 4d9a0bf

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,11 @@ rustc_queries! {
16441644
desc { "normalizing `{:?}`", goal }
16451645
}
16461646

1647+
// FIXME: Implement `normalize_generic_arg_after_erasing_regions` and
1648+
// `normalize_mir_const_after_erasing_regions` in terms of
1649+
// `try_normalize_generic_arg_after_erasing_regions` and
1650+
// `try_normalize_mir_const_after_erasing_regions`, respectively.
1651+
16471652
/// Do not call this query directly: invoke `normalize_erasing_regions` instead.
16481653
query normalize_generic_arg_after_erasing_regions(
16491654
goal: ParamEnvAnd<'tcx, GenericArg<'tcx>>

compiler/rustc_middle/src/ty/layout.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ fn layout_of<'tcx>(
240240
let param_env = param_env.with_reveal_all_normalized(tcx);
241241
let unnormalized_ty = ty;
242242

243+
// FIXME: We might want to have two different versions of `layout_of`:
244+
// One that can be called after typecheck has completed and can use
245+
// `normalize_erasing_regions` here and another one that can be called
246+
// before typecheck has completed and uses `try_normalize_erasing_regions`.
243247
let ty = match tcx.try_normalize_erasing_regions(param_env, ty) {
244248
Ok(t) => t,
245249
Err(normalization_error) => {

src/librustdoc/html/render/print_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
17731773
writeln!(
17741774
w,
17751775
"<p><strong>Note:</strong> Encountered an error during type layout; \
1776-
the type was not normalizable.</p>"
1776+
the type failed to be normalized.</p>"
17771777
)
17781778
}
17791779
}

0 commit comments

Comments
 (0)