about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-12-29 17:05:54 +0800
committerDeadbeef <ent3rm4n@gmail.com>2022-02-12 19:24:43 +1100
commitd3acb9d00e64d68d8c91c9d9925b92cd79b33379 (patch)
tree44891fbd41e701febd1ffab7efb41a9a3891d870 /compiler/rustc_borrowck/src
parent6d6314f878bf489e15293498ecb4af082c8d53d8 (diff)
downloadrust-d3acb9d00e64d68d8c91c9d9925b92cd79b33379.tar.gz
rust-d3acb9d00e64d68d8c91c9d9925b92cd79b33379.zip
Handle Fn family trait call errror
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index ff1d37bfccb..f6d21f879ff 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -196,8 +196,8 @@ 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 { fn_trait_id, .. }
+                            if Some(fn_trait_id) == self.infcx.tcx.lang_items().fn_once_trait() =>
                         {
                             err.span_label(
                                 fn_call_span,