We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c58a11e commit 6d5e8f3Copy full SHA for 6d5e8f3
src/base.rs
@@ -832,15 +832,7 @@ pub(crate) fn codegen_place<'tcx>(
832
for elem in place.projection {
833
match elem {
834
PlaceElem::Deref => {
835
- if cplace.layout().ty.is_box() {
836
- cplace = cplace
837
- .place_field(fx, Field::new(0)) // Box<T> -> Unique<T>
838
- .place_field(fx, Field::new(0)) // Unique<T> -> NonNull<T>
839
- .place_field(fx, Field::new(0)) // NonNull<T> -> *mut T
840
- .place_deref(fx);
841
- } else {
842
- cplace = cplace.place_deref(fx);
843
- }
+ cplace = cplace.place_deref(fx);
844
}
845
PlaceElem::Field(field, _ty) => {
846
cplace = cplace.place_field(fx, field);
0 commit comments