Skip to content

Commit 39f2657

Browse files
committed
Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous) - #108759 (1.41.1 supported 32-bit Apple targets) - #108839 (Canonicalize root var when making response from new solver) - #108856 (Remove DropAndReplace terminator) - #108882 (Tweak E0740) - #108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap) - #108911 (Improve rustdoc-gui/tester.js code a bit) - #108916 (Remove an unused return value in `rustc_hir_typeck`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 66a2d62 + a22c5f9 commit 39f2657

File tree

71 files changed

+284
-461
lines changed

Some content is hidden

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

71 files changed

+284
-461
lines changed

RELEASES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3861,6 +3861,8 @@ Version 1.41.1 (2020-02-27)
38613861
* [Always check types of static items][69145]
38623862
* [Always check lifetime bounds of `Copy` impls][69145]
38633863
* [Fix miscompilation in callers of `Layout::repeat`][69225]
3864+
* [Rust 1.41.0 was announced as the last Rust release with tier 1 or tier 2 support for 32-bit Apple targets][apple-32bit-drop].
3865+
That announcement did not expect a patch release. 1.41.1 also includes release binaries for these targets.
38643866

38653867
[69225]: https://github.com/rust-lang/rust/issues/69225
38663868
[69145]: https://github.com/rust-lang/rust/pull/69145
@@ -3953,7 +3955,7 @@ Misc
39533955
Compatibility Notes
39543956
-------------------
39553957

3956-
- [As previously announced 1.41.0 will be the last tier 1 release for 32-bit
3958+
- [As previously announced 1.41 will be the last tier 1 release for 32-bit
39573959
Apple targets.][apple-32bit-drop] This means that the source code is still
39583960
available to build, but the targets are no longer being tested and release
39593961
binaries for those platforms will no longer be distributed by the Rust project.

compiler/rustc_borrowck/src/invalidation.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
118118
LocalMutationIsAllowed::Yes,
119119
);
120120
}
121-
TerminatorKind::DropAndReplace {
122-
place: drop_place,
123-
value: new_value,
124-
target: _,
125-
unwind: _,
126-
} => {
127-
self.mutate_place(location, *drop_place, Deep);
128-
self.consume_operand(location, new_value);
129-
}
130121
TerminatorKind::Call {
131122
func,
132123
args,

compiler/rustc_borrowck/src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -743,15 +743,6 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
743743
flow_state,
744744
);
745745
}
746-
TerminatorKind::DropAndReplace {
747-
place: drop_place,
748-
value: new_value,
749-
target: _,
750-
unwind: _,
751-
} => {
752-
self.mutate_place(loc, (*drop_place, span), Deep, flow_state);
753-
self.consume_operand(loc, (new_value, span), flow_state);
754-
}
755746
TerminatorKind::Call {
756747
func,
757748
args,
@@ -866,7 +857,6 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
866857
| TerminatorKind::Assert { .. }
867858
| TerminatorKind::Call { .. }
868859
| TerminatorKind::Drop { .. }
869-
| TerminatorKind::DropAndReplace { .. }
870860
| TerminatorKind::FalseEdge { real_target: _, imaginary_target: _ }
871861
| TerminatorKind::FalseUnwind { real_target: _, unwind: _ }
872862
| TerminatorKind::Goto { .. }

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
435435
//
436436
// What we *actually* generate is a store to a temporary
437437
// for the call (`TMP = call()...`) and then a
438-
// `DropAndReplace` to swap that with `X`
439-
// (`DropAndReplace` has very particular semantics).
438+
// `Drop(X)` followed by `X = TMP` to swap that with `X`.
440439
}
441440
}
442441

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,24 +1312,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
13121312
// no checks needed for these
13131313
}
13141314

1315-
TerminatorKind::DropAndReplace { place, value, target: _, unwind: _ } => {
1316-
let place_ty = place.ty(body, tcx).ty;
1317-
let rv_ty = value.ty(body, tcx);
1318-
1319-
let locations = term_location.to_locations();
1320-
if let Err(terr) =
1321-
self.sub_types(rv_ty, place_ty, locations, ConstraintCategory::Assignment)
1322-
{
1323-
span_mirbug!(
1324-
self,
1325-
term,
1326-
"bad DropAndReplace ({:?} = {:?}): {:?}",
1327-
place_ty,
1328-
rv_ty,
1329-
terr
1330-
);
1331-
}
1332-
}
13331315
TerminatorKind::SwitchInt { discr, .. } => {
13341316
self.check_operand(discr, term_location);
13351317

@@ -1629,7 +1611,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
16291611
}
16301612
TerminatorKind::Unreachable => {}
16311613
TerminatorKind::Drop { target, unwind, .. }
1632-
| TerminatorKind::DropAndReplace { target, unwind, .. }
16331614
| TerminatorKind::Assert { target, cleanup: unwind, .. } => {
16341615
self.assert_iscleanup(body, block_data, target, is_cleanup);
16351616
if let Some(unwind) = unwind {

compiler/rustc_borrowck/src/used_muts.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ impl<'visit, 'cx, 'tcx> Visitor<'tcx> for GatherUsedMutsVisitor<'visit, 'cx, 'tc
7171
TerminatorKind::Call { destination, .. } => {
7272
self.remove_never_initialized_mut_locals(*destination);
7373
}
74-
TerminatorKind::DropAndReplace { place, .. } => {
75-
self.remove_never_initialized_mut_locals(*place);
76-
}
7774
_ => {}
7875
}
7976

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
499499
TerminatorKind::Yield { .. }
500500
| TerminatorKind::FalseEdge { .. }
501501
| TerminatorKind::FalseUnwind { .. }
502-
| TerminatorKind::DropAndReplace { .. }
503502
| TerminatorKind::GeneratorDrop => {
504503
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
505504
}

compiler/rustc_codegen_cranelift/src/constant.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
543543
| TerminatorKind::Unreachable
544544
| TerminatorKind::Drop { .. }
545545
| TerminatorKind::Assert { .. } => {}
546-
TerminatorKind::DropAndReplace { .. }
547-
| TerminatorKind::Yield { .. }
546+
TerminatorKind::Yield { .. }
548547
| TerminatorKind::GeneratorDrop
549548
| TerminatorKind::FalseEdge { .. }
550549
| TerminatorKind::FalseUnwind { .. } => unreachable!(),

compiler/rustc_codegen_ssa/src/mir/analyze.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi
295295
TerminatorKind::Call { cleanup: unwind, .. }
296296
| TerminatorKind::InlineAsm { cleanup: unwind, .. }
297297
| TerminatorKind::Assert { cleanup: unwind, .. }
298-
| TerminatorKind::DropAndReplace { unwind, .. }
299298
| TerminatorKind::Drop { unwind, .. } => {
300299
if let Some(unwind) = unwind {
301300
debug!(

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,10 +1305,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
13051305
mergeable_succ(),
13061306
),
13071307

1308-
mir::TerminatorKind::DropAndReplace { .. } => {
1309-
bug!("undesugared DropAndReplace in codegen: {:?}", terminator);
1310-
}
1311-
13121308
mir::TerminatorKind::Call {
13131309
ref func,
13141310
ref args,

0 commit comments

Comments
 (0)