Rebased and improved errors
This commit is contained in:
parent
b5235ea732
commit
6d6314f878
9 changed files with 40 additions and 20 deletions
|
@ -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!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue