Skip to content

Commit 1c799ff

Browse files
Rollup merge of #131521 - jdonszelmann:rc, r=joboet
rename RcBox to RcInner for consistency Arc uses ArcInner too (created in collaboration with `@aDotInTheVoid` and `@WaffleLapkin` )
2 parents 2f3f001 + 9e0a7b9 commit 1c799ff

File tree

10 files changed

+108
-105
lines changed

10 files changed

+108
-105
lines changed

Diff for: compiler/rustc_codegen_ssa/src/mir/block.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -992,10 +992,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
992992
match op.val {
993993
Pair(data_ptr, meta) => {
994994
// In the case of Rc<Self>, we need to explicitly pass a
995-
// *mut RcBox<Self> with a Scalar (not ScalarPair) ABI. This is a hack
995+
// *mut RcInner<Self> with a Scalar (not ScalarPair) ABI. This is a hack
996996
// that is understood elsewhere in the compiler as a method on
997997
// `dyn Trait`.
998-
// To get a `*mut RcBox<Self>`, we just keep unwrapping newtypes until
998+
// To get a `*mut RcInner<Self>`, we just keep unwrapping newtypes until
999999
// we get a value of a built-in pointer type.
10001000
//
10011001
// This is also relevant for `Pin<&mut Self>`, where we need to peel the

Diff for: compiler/rustc_ty_utils/src/abi.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -822,10 +822,10 @@ fn make_thin_self_ptr<'tcx>(
822822
_ => bug!("receiver type has unsupported layout: {:?}", layout),
823823
}
824824

825-
// In the case of Rc<Self>, we need to explicitly pass a *mut RcBox<Self>
825+
// In the case of Rc<Self>, we need to explicitly pass a *mut RcInner<Self>
826826
// with a Scalar (not ScalarPair) ABI. This is a hack that is understood
827827
// elsewhere in the compiler as a method on a `dyn Trait`.
828-
// To get the type `*mut RcBox<Self>`, we just keep unwrapping newtypes until we
828+
// To get the type `*mut RcInner<Self>`, we just keep unwrapping newtypes until we
829829
// get a built-in pointer type
830830
let mut wide_pointer_layout = layout;
831831
while !wide_pointer_layout.ty.is_unsafe_ptr() && !wide_pointer_layout.ty.is_ref() {
@@ -838,7 +838,7 @@ fn make_thin_self_ptr<'tcx>(
838838
wide_pointer_layout.ty
839839
};
840840

841-
// we now have a type like `*mut RcBox<dyn Trait>`
841+
// we now have a type like `*mut RcInner<dyn Trait>`
842842
// change its layout to that of `*mut ()`, a thin pointer, but keep the same type
843843
// this is understood as a special case elsewhere in the compiler
844844
let unit_ptr_ty = Ty::new_mut_ptr(tcx, tcx.types.unit);

0 commit comments

Comments
 (0)