Skip to content

Commit b078564

Browse files
committed
Make use generated TerminatorKind::Call have call_source Use
1 parent e643f59 commit b078564

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: compiler/rustc_middle/src/mir/syntax.rs

+2
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,8 @@ pub enum CallSource {
652652
/// Other types of desugaring that did not come from the HIR, but we don't care about
653653
/// for diagnostics (yet).
654654
Misc,
655+
/// Use of value, generating a clone function call
656+
Use,
655657
/// Normal function call, no special source
656658
Normal,
657659
}

Diff for: 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)