summaryrefslogtreecommitdiff
path: root/compiler/rustc_borrowck/src/diagnostics/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src/diagnostics/mod.rs')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs
index af705e6a80f..611abb01238 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mod.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs
@@ -196,10 +196,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
if self.body.local_decls[local].is_ref_for_guard() {
continue;
}
- if let Some(box LocalInfo::StaticRef { def_id, .. }) =
- &self.body.local_decls[local].local_info
+ if let LocalInfo::StaticRef { def_id, .. } =
+ *self.body.local_decls[local].local_info()
{
- buf.push_str(self.infcx.tcx.item_name(*def_id).as_str());
+ buf.push_str(self.infcx.tcx.item_name(def_id).as_str());
ok = Ok(());
continue;
}