about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2024-02-15 19:54:37 +0000
committerMaybe Lapkin <waffle.lapkin@gmail.com>2024-07-07 17:11:04 +0200
commit484152d562f6babaacb3fae08cc5f70ee550e9ee (patch)
tree300d1010e369b3960213e11a75713fa64e0a0525 /compiler/rustc_monomorphize
parente2cf31a6148725bde4ea48acf1e4fe72675257a2 (diff)
downloadrust-484152d562f6babaacb3fae08cc5f70ee550e9ee.tar.gz
rust-484152d562f6babaacb3fae08cc5f70ee550e9ee.zip
Support tail calls in mir via `TerminatorKind::TailCall`
Diffstat (limited to 'compiler/rustc_monomorphize')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs
index 342c01ff697..3ef8da4a9c5 100644
--- a/compiler/rustc_monomorphize/src/collector.rs
+++ b/compiler/rustc_monomorphize/src/collector.rs
@@ -755,7 +755,8 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
         };
 
         match terminator.kind {
-            mir::TerminatorKind::Call { ref func, ref args, ref fn_span, .. } => {
+            mir::TerminatorKind::Call { ref func, ref args, ref fn_span, .. }
+            | mir::TerminatorKind::TailCall { ref func, ref args, ref fn_span } => {
                 let callee_ty = func.ty(self.body, tcx);
                 // *Before* monomorphizing, record that we already handled this mention.
                 self.used_mentioned_items.insert(MentionedItem::Fn(callee_ty));