diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-02-15 19:54:37 +0000 |
|---|---|---|
| committer | Maybe Lapkin <waffle.lapkin@gmail.com> | 2024-07-07 17:11:04 +0200 |
| commit | 484152d562f6babaacb3fae08cc5f70ee550e9ee (patch) | |
| tree | 300d1010e369b3960213e11a75713fa64e0a0525 /compiler/rustc_monomorphize | |
| parent | e2cf31a6148725bde4ea48acf1e4fe72675257a2 (diff) | |
| download | rust-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.rs | 3 |
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)); |
