Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 386a7c7

Browse files
committedNov 23, 2024
Auto merge of rust-lang#133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwU
finish `Reveal` removal After rust-lang#133212 changed the `TypingMode` to be the only source of truth, this entirely rips out `Reveal`. cc rust-lang#132279 r? `@compiler-errors`
2 parents 826b673 + 776731d commit 386a7c7

File tree

82 files changed

+346
-531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+346
-531
lines changed
 

‎compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub(crate) fn get_function_sig<'tcx>(
8080
clif_sig_from_fn_abi(
8181
tcx,
8282
default_call_conv,
83-
&RevealAllLayoutCx(tcx).fn_abi_of_instance(inst, ty::List::empty()),
83+
&FullyMonomorphizedLayoutCx(tcx).fn_abi_of_instance(inst, ty::List::empty()),
8484
)
8585
}
8686

@@ -438,9 +438,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
438438
extra_args.iter().map(|op_arg| fx.monomorphize(op_arg.node.ty(fx.mir, fx.tcx))),
439439
);
440440
let fn_abi = if let Some(instance) = instance {
441-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(instance, extra_args)
441+
FullyMonomorphizedLayoutCx(fx.tcx).fn_abi_of_instance(instance, extra_args)
442442
} else {
443-
RevealAllLayoutCx(fx.tcx).fn_abi_of_fn_ptr(fn_sig, extra_args)
443+
FullyMonomorphizedLayoutCx(fx.tcx).fn_abi_of_fn_ptr(fn_sig, extra_args)
444444
};
445445

446446
let is_cold = if fn_sig.abi() == ExternAbi::RustCold {
@@ -721,8 +721,8 @@ pub(crate) fn codegen_drop<'tcx>(
721721
def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
722722
args: drop_instance.args,
723723
};
724-
let fn_abi =
725-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(virtual_drop, ty::List::empty());
724+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
725+
.fn_abi_of_instance(virtual_drop, ty::List::empty());
726726

727727
let sig = clif_sig_from_fn_abi(fx.tcx, fx.target_config.default_call_conv, &fn_abi);
728728
let sig = fx.bcx.import_signature(sig);
@@ -764,8 +764,8 @@ pub(crate) fn codegen_drop<'tcx>(
764764
def: ty::InstanceKind::Virtual(drop_instance.def_id(), 0),
765765
args: drop_instance.args,
766766
};
767-
let fn_abi =
768-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(virtual_drop, ty::List::empty());
767+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
768+
.fn_abi_of_instance(virtual_drop, ty::List::empty());
769769

770770
let sig = clif_sig_from_fn_abi(fx.tcx, fx.target_config.default_call_conv, &fn_abi);
771771
let sig = fx.bcx.import_signature(sig);
@@ -774,8 +774,8 @@ pub(crate) fn codegen_drop<'tcx>(
774774
_ => {
775775
assert!(!matches!(drop_instance.def, InstanceKind::Virtual(_, _)));
776776

777-
let fn_abi =
778-
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(drop_instance, ty::List::empty());
777+
let fn_abi = FullyMonomorphizedLayoutCx(fx.tcx)
778+
.fn_abi_of_instance(drop_instance, ty::List::empty());
779779

780780
let arg_value = drop_place.place_ref(
781781
fx,

‎compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub(crate) fn codegen_fn<'tcx>(
103103
let block_map: IndexVec<BasicBlock, Block> =
104104
(0..mir.basic_blocks.len()).map(|_| bcx.create_block()).collect();
105105

106-
let fn_abi = RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty());
106+
let fn_abi = FullyMonomorphizedLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty());
107107

108108
// Make FunctionCx
109109
let target_config = module.target_config();

0 commit comments

Comments
 (0)
Please sign in to comment.