Skip to content

Commit fe69acf

Browse files
committed
Merge from rustc
2 parents c5013ce + 2f65aac commit fe69acf

File tree

264 files changed

+5324
-3431
lines changed

Some content is hidden

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

264 files changed

+5324
-3431
lines changed

Cargo.lock

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4379,6 +4379,15 @@ dependencies = [
43794379
"tracing-tree",
43804380
]
43814381

4382+
[[package]]
4383+
name = "rustdoc-gui-test"
4384+
version = "0.1.0"
4385+
dependencies = [
4386+
"compiletest",
4387+
"getopts",
4388+
"walkdir",
4389+
]
4390+
43824391
[[package]]
43834392
name = "rustdoc-json-types"
43844393
version = "0.1.0"
@@ -4972,22 +4981,22 @@ checksum = "aac81b6fd6beb5884b0cf3321b8117e6e5d47ecb6fc89f414cfdcca8b2fe2dd8"
49724981

49734982
[[package]]
49744983
name = "thiserror"
4975-
version = "1.0.38"
4984+
version = "1.0.40"
49764985
source = "registry+https://github.com/rust-lang/crates.io-index"
4977-
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
4986+
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
49784987
dependencies = [
49794988
"thiserror-impl",
49804989
]
49814990

49824991
[[package]]
49834992
name = "thiserror-impl"
4984-
version = "1.0.38"
4993+
version = "1.0.40"
49854994
source = "registry+https://github.com/rust-lang/crates.io-index"
4986-
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
4995+
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
49874996
dependencies = [
49884997
"proc-macro2",
49894998
"quote",
4990-
"syn 1.0.102",
4999+
"syn 2.0.8",
49915000
]
49925001

49935002
[[package]]

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ members = [
4040
"src/tools/generate-copyright",
4141
"src/tools/suggest-tests",
4242
"src/tools/generate-windows-sys",
43+
"src/tools/rustdoc-gui-test",
4344
]
4445

4546
exclude = [

RELEASES.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,139 @@
1+
Version 1.70.0 (2023-06-01)
2+
==========================
3+
4+
<a id="1.70.0-Language"></a>
5+
6+
Language
7+
--------
8+
- [Relax ordering rules for `asm!` operands](https://github.com/rust-lang/rust/pull/105798/)
9+
- [Properly allow macro expanded `format_args` invocations to uses captures](https://github.com/rust-lang/rust/pull/106505/)
10+
- [Lint ambiguous glob re-exports](https://github.com/rust-lang/rust/pull/107880/)
11+
- [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
12+
13+
<a id="1.70.0-Compiler"></a>
14+
15+
Compiler
16+
--------
17+
- [Extend -Cdebuginfo with new options and named aliases](https://github.com/rust-lang/rust/pull/109808/)
18+
This provides a smaller version of debuginfo for cases that only need line number information
19+
(`-Cdebuginfo=line-tables-only`), which may eventually become the default for `-Cdebuginfo=1`.
20+
- [Make `unused_allocation` lint against `Box::new` too](https://github.com/rust-lang/rust/pull/104363/)
21+
- [Detect uninhabited types early in const eval](https://github.com/rust-lang/rust/pull/109435/)
22+
- [Switch to LLD as default linker for {arm,thumb}v4t-none-eabi](https://github.com/rust-lang/rust/pull/109721/)
23+
- [Add tier 3 target `loongarch64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/96971)
24+
- [Add tier 3 target for `i586-pc-nto-qnx700` (QNX Neutrino RTOS, version 7.0)](https://github.com/rust-lang/rust/pull/109173/),
25+
- [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
26+
This catches undefined behavior at runtime, and may cause existing code to fail.
27+
28+
Refer to Rust's [platform support page][platform-support-doc]
29+
for more information on Rust's tiered platform support.
30+
31+
<a id="1.70.0-Libraries"></a>
32+
33+
Libraries
34+
---------
35+
- [Document NonZeroXxx layout guarantees](https://github.com/rust-lang/rust/pull/94786/)
36+
- [Windows: make `Command` prefer non-verbatim paths](https://github.com/rust-lang/rust/pull/96391/)
37+
- [Implement Default for some alloc/core iterators](https://github.com/rust-lang/rust/pull/99929/)
38+
- [Fix handling of trailing bare CR in str::lines](https://github.com/rust-lang/rust/pull/100311/)
39+
- [allow negative numeric literals in `concat!`](https://github.com/rust-lang/rust/pull/106844/)
40+
- [Add documentation about the memory layout of `Cell`](https://github.com/rust-lang/rust/pull/106921/)
41+
- [Use `partial_cmp` to implement tuple `lt`/`le`/`ge`/`gt`](https://github.com/rust-lang/rust/pull/108157/)
42+
- [Stabilize `atomic_as_ptr`](https://github.com/rust-lang/rust/pull/108419/)
43+
- [Stabilize `nonnull_slice_from_raw_parts`](https://github.com/rust-lang/rust/pull/97506/)
44+
- [Partial stabilization of `once_cell`](https://github.com/rust-lang/rust/pull/105587/)
45+
- [Stabilize `nonzero_min_max`](https://github.com/rust-lang/rust/pull/106633/)
46+
- [Flatten/inline format_args!() and (string and int) literal arguments into format_args!()](https://github.com/rust-lang/rust/pull/106824/)
47+
- [Stabilize movbe target feature](https://github.com/rust-lang/rust/pull/107711/)
48+
- [don't splice from files into pipes in io::copy](https://github.com/rust-lang/rust/pull/108283/)
49+
- [Add a builtin unstable `FnPtr` trait that is implemented for all function pointers](https://github.com/rust-lang/rust/pull/108080/)
50+
This extends `Debug`, `Pointer`, `Hash`, `PartialEq`, `Eq`, `PartialOrd`, and `Ord`
51+
implementations for function pointers with all ABIs.
52+
53+
<a id="1.70.0-Stabilized-APIs"></a>
54+
55+
Stabilized APIs
56+
---------------
57+
58+
- [`NonZero*::MIN/MAX`](https://doc.rust-lang.org/stable/std/num/struct.NonZeroI8.html#associatedconstant.MIN)
59+
- [`BinaryHeap::retain`](https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.retain)
60+
- [`Default for std::collections::binary_heap::IntoIter`](https://doc.rust-lang.org/stable/std/collections/binary_heap/struct.IntoIter.html)
61+
- [`Default for std::collections::btree_map::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoIter.html)
62+
- [`Default for std::collections::btree_map::{IntoKeys, Keys}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
63+
- [`Default for std::collections::btree_map::{IntoValues, Values}`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.IntoKeys.html)
64+
- [`Default for std::collections::btree_map::Range`](https://doc.rust-lang.org/stable/std/collections/btree_map/struct.Range.html)
65+
- [`Default for std::collections::btree_set::{IntoIter, Iter}`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.IntoIter.html)
66+
- [`Default for std::collections::btree_set::Range`](https://doc.rust-lang.org/stable/std/collections/btree_set/struct.Range.html)
67+
- [`Default for std::collections::linked_list::{IntoIter, Iter, IterMut}`](https://doc.rust-lang.org/stable/alloc/collections/linked_list/struct.IntoIter.html)
68+
- [`Default for std::vec::IntoIter`](https://doc.rust-lang.org/stable/alloc/vec/struct.IntoIter.html#impl-Default-for-IntoIter%3CT,+A%3E)
69+
- [`Default for std::iter::Chain`](https://doc.rust-lang.org/stable/std/iter/struct.Chain.html)
70+
- [`Default for std::iter::Cloned`](https://doc.rust-lang.org/stable/std/iter/struct.Cloned.html)
71+
- [`Default for std::iter::Copied`](https://doc.rust-lang.org/stable/std/iter/struct.Copied.html)
72+
- [`Default for std::iter::Enumerate`](https://doc.rust-lang.org/stable/std/iter/struct.Enumerate.html)
73+
- [`Default for std::iter::Flatten`](https://doc.rust-lang.org/stable/std/iter/struct.Flatten.html)
74+
- [`Default for std::iter::Fuse`](https://doc.rust-lang.org/stable/std/iter/struct.Fuse.html)
75+
- [`Default for std::iter::Rev`](https://doc.rust-lang.org/stable/std/iter/struct.Rev.html)
76+
- [`Default for std::slice::Iter`](https://doc.rust-lang.org/stable/std/slice/struct.Iter.html)
77+
- [`Default for std::slice::IterMut`](https://doc.rust-lang.org/stable/std/slice/struct.IterMut.html)
78+
- [`Rc::into_inner`](https://doc.rust-lang.org/stable/alloc/rc/struct.Rc.html#method.into_inner)
79+
- [`Arc::into_inner`](https://doc.rust-lang.org/stable/alloc/sync/struct.Arc.html#method.into_inner)
80+
- [`std::cell::OnceCell`](https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html)
81+
- [`Option::is_some_and`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some_and)
82+
- [`NonNull::slice_from_raw_parts`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.slice_from_raw_parts)
83+
- [`Result::is_ok_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_ok_and)
84+
- [`Result::is_err_and`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.is_err_and)
85+
- [`std::sync::atomic::Atomic*::as_ptr`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicU8.html#method.as_ptr)
86+
- [`std::io::IsTerminal`](https://doc.rust-lang.org/stable/std/io/trait.IsTerminal.html)
87+
- [`std::os::linux::net::SocketAddrExt`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html)
88+
- [`std::os::unix::net::UnixDatagram::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.bind_addr)
89+
- [`std::os::unix::net::UnixDatagram::connect_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.connect_addr)
90+
- [`std::os::unix::net::UnixDatagram::send_to_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixDatagram.html#method.send_to_addr)
91+
- [`std::os::unix::net::UnixListener::bind_addr`](https://doc.rust-lang.org/stable/std/os/unix/net/struct.UnixListener.html#method.bind_addr)
92+
- [`std::path::Path::as_mut_os_str`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.as_mut_os_str)
93+
- [`std::sync::OnceLock`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html)
94+
95+
<a id="1.70.0-Cargo"></a>
96+
97+
Cargo
98+
-----
99+
100+
- [Add `CARGO_PKG_README`](https://github.com/rust-lang/cargo/pull/11645/)
101+
- [Make `sparse` the default protocol for crates.io](https://github.com/rust-lang/cargo/pull/11791/)
102+
- [Accurately show status when downgrading dependencies](https://github.com/rust-lang/cargo/pull/11839/)
103+
- [Use registry.default for login/logout](https://github.com/rust-lang/cargo/pull/11949/)
104+
- [Stabilize `cargo logout`](https://github.com/rust-lang/cargo/pull/11950/)
105+
106+
<a id="1.70.0-Misc"></a>
107+
108+
Misc
109+
----
110+
111+
- [Stabilize rustdoc `--test-run-directory`](https://github.com/rust-lang/rust/pull/103682/)
112+
113+
<a id="1.70.0-Compatibility-Notes"></a>
114+
115+
Compatibility Notes
116+
-------------------
117+
118+
- [Prevent stable `libtest` from supporting `-Zunstable-options`](https://github.com/rust-lang/rust/pull/109044/)
119+
- [Perform const and unsafe checking for expressions in `let _ = expr` position.](https://github.com/rust-lang/rust/pull/102256/)
120+
- [WebAssembly targets enable `sign-ext` and `mutable-globals` features in codegen](https://github.com/rust-lang/rust/issues/109807)
121+
This may cause incompatibility with older execution environments.
122+
- [Insert alignment checks for pointer dereferences as debug assertions](https://github.com/rust-lang/rust/pull/98112)
123+
This catches undefined behavior at runtime, and may cause existing code to fail.
124+
125+
<a id="1.70.0-Internal-Changes"></a>
126+
127+
Internal Changes
128+
----------------
129+
130+
These changes do not affect any public interfaces of Rust, but they represent
131+
significant improvements to the performance or internals of rustc and related
132+
tools.
133+
134+
- [Upgrade to LLVM 16](https://github.com/rust-lang/rust/pull/109474/)
135+
- [Use SipHash-1-3 instead of SipHash-2-4 for StableHasher](https://github.com/rust-lang/rust/pull/107925/)
136+
1137
Version 1.69.0 (2023-04-20)
2138
==========================
3139

compiler/rustc_ast/src/token.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1111
use rustc_data_structures::sync::Lrc;
1212
use rustc_macros::HashStable_Generic;
1313
use rustc_span::symbol::{kw, sym};
14+
#[cfg_attr(not(bootstrap), allow(hidden_glob_reexports))]
1415
use rustc_span::symbol::{Ident, Symbol};
1516
use rustc_span::{self, edition::Edition, Span, DUMMY_SP};
1617
use std::borrow::Cow;

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,34 +1635,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
16351635
})
16361636
}
16371637

1638-
/// Reports StorageDeadOrDrop of `place` conflicts with `borrow`.
1639-
///
1640-
/// Depending on the origin of the StorageDeadOrDrop, this may be
1641-
/// reported as either a drop or an illegal mutation of a borrowed value.
1642-
/// The latter is preferred when the this is a drop triggered by a
1643-
/// reassignment, as it's more user friendly to report a problem with the
1644-
/// explicit assignment than the implicit drop.
1645-
#[instrument(level = "debug", skip(self))]
1646-
pub(crate) fn report_storage_dead_or_drop_of_borrowed(
1647-
&mut self,
1648-
location: Location,
1649-
place_span: (Place<'tcx>, Span),
1650-
borrow: &BorrowData<'tcx>,
1651-
) {
1652-
// It's sufficient to check the last desugaring as Replace is the last
1653-
// one to be applied.
1654-
if let Some(DesugaringKind::Replace) = place_span.1.desugaring_kind() {
1655-
self.report_illegal_mutation_of_borrowed(location, place_span, borrow)
1656-
} else {
1657-
self.report_borrowed_value_does_not_live_long_enough(
1658-
location,
1659-
borrow,
1660-
place_span,
1661-
Some(WriteKind::StorageDeadOrDrop),
1662-
)
1663-
}
1664-
}
1665-
16661638
/// This means that some data referenced by `borrow` needs to live
16671639
/// past the point where the StorageDeadOrDrop of `place` occurs.
16681640
/// This is usually interpreted as meaning that `place` has too

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -641,13 +641,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
641641
let Some(hir::Node::Item(item)) = node else { return; };
642642
let hir::ItemKind::Fn(.., body_id) = item.kind else { return; };
643643
let body = self.infcx.tcx.hir().body(body_id);
644-
let mut assign_span = span;
645-
// Drop desugaring is done at MIR build so it's not in the HIR
646-
if let Some(DesugaringKind::Replace) = span.desugaring_kind() {
647-
assign_span.remove_mark();
648-
}
649644

650-
let mut v = V { assign_span, err, ty, suggested: false };
645+
let mut v = V { assign_span: span, err, ty, suggested: false };
651646
v.visit_body(body);
652647
if !v.suggested {
653648
err.help(format!(

compiler/rustc_borrowck/src/invalidation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
112112
TerminatorKind::SwitchInt { discr, targets: _ } => {
113113
self.consume_operand(location, discr);
114114
}
115-
TerminatorKind::Drop { place: drop_place, target: _, unwind: _ } => {
115+
TerminatorKind::Drop { place: drop_place, target: _, unwind: _, replace } => {
116+
let write_kind =
117+
if *replace { WriteKind::Replace } else { WriteKind::StorageDeadOrDrop };
116118
self.access_place(
117119
location,
118120
*drop_place,
119-
(AccessDepth::Drop, Write(WriteKind::StorageDeadOrDrop)),
121+
(AccessDepth::Drop, Write(write_kind)),
120122
LocalMutationIsAllowed::Yes,
121123
);
122124
}

compiler/rustc_borrowck/src/lib.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,17 +685,19 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
685685
TerminatorKind::SwitchInt { discr, targets: _ } => {
686686
self.consume_operand(loc, (discr, span), flow_state);
687687
}
688-
TerminatorKind::Drop { place, target: _, unwind: _ } => {
688+
TerminatorKind::Drop { place, target: _, unwind: _, replace } => {
689689
debug!(
690690
"visit_terminator_drop \
691691
loc: {:?} term: {:?} place: {:?} span: {:?}",
692692
loc, term, place, span
693693
);
694694

695+
let write_kind =
696+
if *replace { WriteKind::Replace } else { WriteKind::StorageDeadOrDrop };
695697
self.access_place(
696698
loc,
697699
(*place, span),
698-
(AccessDepth::Drop, Write(WriteKind::StorageDeadOrDrop)),
700+
(AccessDepth::Drop, Write(write_kind)),
699701
LocalMutationIsAllowed::Yes,
700702
flow_state,
701703
);
@@ -885,6 +887,7 @@ enum ReadKind {
885887
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
886888
enum WriteKind {
887889
StorageDeadOrDrop,
890+
Replace,
888891
MutableBorrow(BorrowKind),
889892
Mutate,
890893
Move,
@@ -1132,13 +1135,21 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11321135
this.buffer_error(err);
11331136
}
11341137
WriteKind::StorageDeadOrDrop => this
1135-
.report_storage_dead_or_drop_of_borrowed(location, place_span, borrow),
1138+
.report_borrowed_value_does_not_live_long_enough(
1139+
location,
1140+
borrow,
1141+
place_span,
1142+
Some(WriteKind::StorageDeadOrDrop),
1143+
),
11361144
WriteKind::Mutate => {
11371145
this.report_illegal_mutation_of_borrowed(location, place_span, borrow)
11381146
}
11391147
WriteKind::Move => {
11401148
this.report_move_out_while_borrowed(location, place_span, borrow)
11411149
}
1150+
WriteKind::Replace => {
1151+
this.report_illegal_mutation_of_borrowed(location, place_span, borrow)
1152+
}
11421153
}
11431154
Control::Break
11441155
}
@@ -1982,12 +1993,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
19821993

19831994
Reservation(
19841995
WriteKind::Move
1996+
| WriteKind::Replace
19851997
| WriteKind::StorageDeadOrDrop
19861998
| WriteKind::MutableBorrow(BorrowKind::Shared)
19871999
| WriteKind::MutableBorrow(BorrowKind::Shallow),
19882000
)
19892001
| Write(
19902002
WriteKind::Move
2003+
| WriteKind::Replace
19912004
| WriteKind::StorageDeadOrDrop
19922005
| WriteKind::MutableBorrow(BorrowKind::Shared)
19932006
| WriteKind::MutableBorrow(BorrowKind::Shallow),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use rustc_index::bit_set::HybridBitSet;
33
use rustc_index::interval::IntervalSet;
44
use rustc_infer::infer::canonical::QueryRegionConstraints;
55
use rustc_middle::mir::{BasicBlock, Body, ConstraintCategory, Local, Location};
6+
use rustc_middle::traits::query::DropckOutlivesResult;
67
use rustc_middle::ty::{Ty, TyCtxt, TypeVisitable, TypeVisitableExt};
78
use rustc_span::DUMMY_SP;
8-
use rustc_trait_selection::traits::query::dropck_outlives::DropckOutlivesResult;
99
use rustc_trait_selection::traits::query::type_op::outlives::DropckOutlives;
1010
use rustc_trait_selection::traits::query::type_op::{TypeOp, TypeOpOutput};
1111
use std::rc::Rc;

compiler/rustc_builtin_macros/src/assert/context.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,19 @@ impl<'cx, 'a> Context<'cx, 'a> {
233233
ExprKind::Cast(local_expr, _) => {
234234
self.manage_cond_expr(local_expr);
235235
}
236+
ExprKind::If(local_expr, _, _) => {
237+
self.manage_cond_expr(local_expr);
238+
}
236239
ExprKind::Index(prefix, suffix) => {
237240
self.manage_cond_expr(prefix);
238241
self.manage_cond_expr(suffix);
239242
}
243+
ExprKind::Let(_, local_expr, _) => {
244+
self.manage_cond_expr(local_expr);
245+
}
246+
ExprKind::Match(local_expr, _) => {
247+
self.manage_cond_expr(local_expr);
248+
}
240249
ExprKind::MethodCall(call) => {
241250
for arg in &mut call.args {
242251
self.manage_cond_expr(arg);
@@ -295,17 +304,14 @@ impl<'cx, 'a> Context<'cx, 'a> {
295304
| ExprKind::Continue(_)
296305
| ExprKind::Err
297306
| ExprKind::Field(_, _)
298-
| ExprKind::FormatArgs(_)
299307
| ExprKind::ForLoop(_, _, _, _)
300-
| ExprKind::If(_, _, _)
308+
| ExprKind::FormatArgs(_)
301309
| ExprKind::IncludedBytes(..)
302310
| ExprKind::InlineAsm(_)
303-
| ExprKind::OffsetOf(_, _)
304-
| ExprKind::Let(_, _, _)
305311
| ExprKind::Lit(_)
306312
| ExprKind::Loop(_, _, _)
307313
| ExprKind::MacCall(_)
308-
| ExprKind::Match(_, _)
314+
| ExprKind::OffsetOf(_, _)
309315
| ExprKind::Path(_, _)
310316
| ExprKind::Ret(_)
311317
| ExprKind::Try(_)

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
473473
| TerminatorKind::GeneratorDrop => {
474474
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
475475
}
476-
TerminatorKind::Drop { place, target, unwind: _ } => {
476+
TerminatorKind::Drop { place, target, unwind: _, replace: _ } => {
477477
let drop_place = codegen_place(fx, *place);
478478
crate::abi::codegen_drop(fx, source_info, drop_place);
479479

0 commit comments

Comments
 (0)