Make use generated TerminatorKind::Call have call_source Use

This commit is contained in:
Santiago Pastorino 2025-03-28 10:01:29 -03:00
parent e643f59f6d
commit b078564fe6
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 3 additions and 1 deletions

View file

@ -652,6 +652,8 @@ pub enum CallSource {
/// Other types of desugaring that did not come from the HIR, but we don't care about
/// for diagnostics (yet).
Misc,
/// Use of value, generating a clone function call
Use,
/// Normal function call, no special source
Normal,
}

View file

@ -328,7 +328,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
destination,
target: Some(success),
unwind: UnwindAction::Unreachable,
call_source: CallSource::Misc,
call_source: CallSource::Use,
fn_span: expr_span,
},
);