Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3700bb5

Browse files
committedJul 8, 2024·
Auto merge of rust-lang#127475 - jieyouxu:rollup-ayualfk, r=jieyouxu
Rollup of 12 pull requests Successful merges: - rust-lang#113128 (Support tail calls in mir via `TerminatorKind::TailCall`) - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals) - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024) - rust-lang#126921 (Give VaList its own home) - rust-lang#127276 (rustdoc: Remove OpaqueTy) - rust-lang#127367 (Run alloc sync tests) - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields) - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`) - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`) - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API) - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`) - rust-lang#127459 (rustdoc-json: add type/trait alias tests) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b1de36f + d200683 commit 3700bb5

File tree

167 files changed

+4381
-1830
lines changed

Some content is hidden

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

167 files changed

+4381
-1830
lines changed
 

‎compiler/rustc_borrowck/src/lib.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,12 @@ impl<'a, 'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
727727
}
728728
self.mutate_place(loc, (*destination, span), Deep, flow_state);
729729
}
730+
TerminatorKind::TailCall { func, args, fn_span: _ } => {
731+
self.consume_operand(loc, (func, span), flow_state);
732+
for arg in args {
733+
self.consume_operand(loc, (&arg.node, arg.span), flow_state);
734+
}
735+
}
730736
TerminatorKind::Assert { cond, expected: _, msg, target: _, unwind: _ } => {
731737
self.consume_operand(loc, (cond, span), flow_state);
732738
if let AssertKind::BoundsCheck { len, index } = &**msg {
@@ -813,9 +819,8 @@ impl<'a, 'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
813819

814820
TerminatorKind::UnwindResume
815821
| TerminatorKind::Return
822+
| TerminatorKind::TailCall { .. }
816823
| TerminatorKind::CoroutineDrop => {
817-
// Returning from the function implicitly kills storage for all locals and statics.
818-
// Often, the storage will already have been killed by an explicit
819824
// StorageDead, but we don't always emit those (notably on unwind paths),
820825
// so this "extra check" serves as a kind of backup.
821826
let borrow_set = self.borrow_set.clone();

‎compiler/rustc_borrowck/src/polonius/loan_invalidations.rs

+6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ impl<'cx, 'tcx> Visitor<'tcx> for LoanInvalidationsGenerator<'cx, 'tcx> {
125125
}
126126
self.mutate_place(location, *destination, Deep);
127127
}
128+
TerminatorKind::TailCall { func, args, .. } => {
129+
self.consume_operand(location, func);
130+
for arg in args {
131+
self.consume_operand(location, &arg.node);
132+
}
133+
}
128134
TerminatorKind::Assert { cond, expected: _, msg, target: _, unwind: _ } => {
129135
self.consume_operand(location, cond);
130136
use rustc_middle::mir::AssertKind;

0 commit comments

Comments
 (0)
Please sign in to comment.