Skip to content

Commit 491dd4d

Browse files
committed
Checkpoint
1 parent 456b404 commit 491dd4d

File tree

5 files changed

+9
-51
lines changed

5 files changed

+9
-51
lines changed

compiler/rustc_ty_utils/src/abi.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,7 @@ fn fn_sig_for_fn_abi<'tcx>(
5353
//
5454
// We normalize the `fn_sig` again after instantiating at a later point.
5555
let mut sig = match *ty.kind() {
56-
ty::FnDef(def_id, args) => tcx
57-
.fn_sig(def_id)
58-
.map_bound(|fn_sig| {
59-
tcx.normalize_erasing_regions(
60-
ty::TypingEnv::non_body_analysis(tcx, def_id),
61-
fn_sig,
62-
)
63-
})
64-
.instantiate(tcx, args),
56+
ty::FnDef(def_id, args) => tcx.fn_sig(def_id).instantiate(tcx, args),
6557
_ => unreachable!(),
6658
};
6759

compiler/rustc_ty_utils/src/layout.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,13 @@ fn layout_of_uncached<'tcx>(
594594

595595
let maybe_unsized = def.is_struct()
596596
&& def.non_enum_variant().tail_opt().is_some_and(|last_field| {
597+
/*
598+
let typing_env = if cx.typing_env == ty::TypingEnv::fully_monomorphized() {
599+
cx.typing_env
600+
} else {
601+
ty::TypingEnv::post_analysis(tcx, def.did())
602+
};
603+
*/
597604
let typing_env = ty::TypingEnv::post_analysis(tcx, def.did());
598605
!tcx.type_of(last_field.did).instantiate_identity().is_sized(tcx, typing_env)
599606
});

tests/ui/const-generics/generic_const_exprs/issue-94287.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ aux-build:issue-94287-aux.rs
2-
//@ build-fail
2+
//@ build-pass
33

44
extern crate issue_94287_aux;
55

tests/ui/const-generics/generic_const_exprs/issue-94287.stderr

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/ui/polymorphization/normalized_sig_types.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)