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
2 changed files with 3 additions and 1 deletions
+2
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,
}
@@ -328,7 +328,7 @@ pub(crate) fn expr_into_dest(
destination,
target: Some(success),
unwind: UnwindAction::Unreachable,
call_source: CallSource::Misc,
call_source: CallSource::Use,
fn_span: expr_span,
},
);