1
Fork 0

Rebased and improved errors

This commit is contained in:
Deadbeef 2021-12-29 16:29:14 +08:00
parent b5235ea732
commit 6d6314f878
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9
9 changed files with 40 additions and 20 deletions

View file

@ -196,7 +196,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
.map(|n| format!("`{}`", n))
.unwrap_or_else(|| "value".to_owned());
match kind {
CallKind::FnCall(once_did) if Some(once_did) == self.infcx.tcx.lang_items().fn_once_trait() => {
CallKind::FnCall(once_did)
if Some(once_did) == self.infcx.tcx.lang_items().fn_once_trait() =>
{
err.span_label(
fn_call_span,
&format!(