Skip to content

Commit 07ed5e9

Browse files
committed
Fix rustc test suite
1 parent b2fee30 commit 07ed5e9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

scripts/test_rustc_tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|//@ error-pa
1919
rm $test
2020
done
2121

22-
git checkout -- tests/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
22+
git checkout -- tests/ui/cross-crate/auxiliary/nested-struct-in-polymorphic-impl-method.rs # contains //~ERROR, but shouldn't be removed
2323
git checkout -- tests/ui/entry-point/auxiliary/bad_main_functions.rs
2424

2525
# missing features
@@ -149,6 +149,7 @@ rm tests/ui/abi/large-byval-align.rs # exceeds implementation limit of Cranelift
149149
rm -r tests/run-make/short-ice # ICE backtrace begin/end marker mismatch
150150
rm -r tests/run-make/naked-dead-code-elimination # function not eliminated
151151
rm tests/ui/codegen/huge-stacks.rs # Cranelift doesn't allow stack frames to exceed 4GB
152+
rm -r tests/run-make/doctests-test_harness # different thread names likely caused by -Zpanic-abort-tests
152153

153154
# doesn't work due to the way the rustc test suite is invoked.
154155
# should work when using ./x.py test the way it is intended
@@ -175,6 +176,7 @@ rm tests/codegen-units/item-collection/opaque-return-impls.rs # extra mono item.
175176
# ============
176177
rm -r tests/run-make/extern-fn-explicit-align # argument alignment not yet supported
177178
rm -r tests/run-make/panic-abort-eh_frame # .eh_frame emitted with panic=abort
179+
rm -r tests/run-make/staticlib-hide-internal-symbols # -Zstaticlib-hide-internal-symbols seems to be broken
178180

179181
# bugs in the test suite
180182
# ======================

src/base.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,11 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
628628
let ref_ = place.place_ref(fx, lval.layout());
629629
lval.write_cvalue(fx, ref_);
630630
}
631-
Rvalue::Reborrow(_, _, place) => {
631+
Rvalue::Reborrow(ty, _, place) => {
632+
assert_eq!(lval.layout().ty, ty);
632633
let cplace = codegen_place(fx, place);
633634
let val = cplace.to_cvalue(fx);
634-
lval.write_cvalue(fx, val)
635+
lval.write_cvalue_transmute(fx, val)
635636
}
636637
Rvalue::ThreadLocalRef(def_id) => {
637638
let val = crate::constant::codegen_tls_ref(fx, def_id, lval.layout());

0 commit comments

Comments
 (0)