Skip to content

Commit 038ca4b

Browse files
committed
Make use generated TerminatorKind::Call have call_source Use
1 parent ecb170a commit 038ca4b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_middle/src/mir/syntax.rs

+2
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ pub enum CallSource {
596596
/// Other types of desugaring that did not come from the HIR, but we don't care about
597597
/// for diagnostics (yet).
598598
Misc,
599+
/// Use of value, generating a clone function call
600+
Use,
599601
/// Normal function call, no special source
600602
Normal,
601603
}

compiler/rustc_mir_build/src/builder/expr/into.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
328328
destination,
329329
target: Some(success),
330330
unwind: UnwindAction::Unreachable,
331-
call_source: CallSource::Misc,
331+
call_source: CallSource::Use,
332332
fn_span: expr_span,
333333
},
334334
);

0 commit comments

Comments
 (0)