about summary refs log tree commit diff
path: root/src/librustc/infer
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2019-11-29 11:09:23 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2019-12-21 23:39:19 +0100
commit9694ab9e18f0b6b306dafaaccb8cc33a293302bd (patch)
tree23ee1c82a6ac56849685acf0156a95b149e033f2 /src/librustc/infer
parent42c03e4bb47b4758aa4f65c02ef9eba901a801b7 (diff)
downloadrust-9694ab9e18f0b6b306dafaaccb8cc33a293302bd.tar.gz
rust-9694ab9e18f0b6b306dafaaccb8cc33a293302bd.zip
Use Arena inside hir::Body.
Diffstat (limited to 'src/librustc/infer')
-rw-r--r--src/librustc/infer/error_reporting/need_type_info.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/infer/error_reporting/need_type_info.rs b/src/librustc/infer/error_reporting/need_type_info.rs
index ebb94cc72ff..378d6d78d32 100644
--- a/src/librustc/infer/error_reporting/need_type_info.rs
+++ b/src/librustc/infer/error_reporting/need_type_info.rs
@@ -83,8 +83,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindLocalByTypeVisitor<'a, 'tcx> {
         intravisit::walk_local(self, local);
     }
 
-    fn visit_body(&mut self, body: &'tcx Body) {
-        for param in &body.params {
+    fn visit_body(&mut self, body: &'tcx Body<'tcx>) {
+        for param in body.params {
             if let (None, Some(ty)) = (
                 self.found_arg_pattern,
                 self.node_matches_type(param.hir_id),
@@ -113,7 +113,7 @@ fn closure_return_type_suggestion(
     span: Span,
     err: &mut DiagnosticBuilder<'_>,
     output: &FunctionRetTy,
-    body: &Body,
+    body: &Body<'_>,
     descr: &str,
     name: &str,
     ret: &str,