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 13:43:03 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2019-12-26 23:36:12 +0100
commit2b1cfe5b5b3c33b71002e71b7d2e6d6505d551f2 (patch)
treefc93efa42c12e1f053716ccd5b7245a5ff9e8cae /src/librustc/infer
parent3e0a1c09108b52e41113520c7fa516480a8b67f9 (diff)
downloadrust-2b1cfe5b5b3c33b71002e71b7d2e6d6505d551f2.tar.gz
rust-2b1cfe5b5b3c33b71002e71b7d2e6d6505d551f2.zip
Syntax for hir::Expr.
Diffstat (limited to 'src/librustc/infer')
-rw-r--r--src/librustc/infer/error_reporting/need_type_info.rs14
-rw-r--r--src/librustc/infer/error_reporting/nice_region_error/util.rs2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc/infer/error_reporting/need_type_info.rs b/src/librustc/infer/error_reporting/need_type_info.rs
index 9954c35433c..cb3d16b633d 100644
--- a/src/librustc/infer/error_reporting/need_type_info.rs
+++ b/src/librustc/infer/error_reporting/need_type_info.rs
@@ -17,11 +17,11 @@ struct FindLocalByTypeVisitor<'a, 'tcx> {
     infcx: &'a InferCtxt<'a, 'tcx>,
     target_ty: Ty<'tcx>,
     hir_map: &'a hir::map::Map<'tcx>,
-    found_local_pattern: Option<&'tcx Pat>,
-    found_arg_pattern: Option<&'tcx Pat>,
+    found_local_pattern: Option<&'tcx Pat<'tcx>>,
+    found_arg_pattern: Option<&'tcx Pat<'tcx>>,
     found_ty: Option<Ty<'tcx>>,
-    found_closure: Option<&'tcx ExprKind>,
-    found_method_call: Option<&'tcx Expr>,
+    found_closure: Option<&'tcx ExprKind<'tcx>>,
+    found_method_call: Option<&'tcx Expr<'tcx>>,
 }
 
 impl<'a, 'tcx> FindLocalByTypeVisitor<'a, 'tcx> {
@@ -72,7 +72,7 @@ impl<'a, 'tcx> Visitor<'tcx> for FindLocalByTypeVisitor<'a, 'tcx> {
         NestedVisitorMap::OnlyBodies(&self.hir_map)
     }
 
-    fn visit_local(&mut self, local: &'tcx Local) {
+    fn visit_local(&mut self, local: &'tcx Local<'tcx>) {
         if let (None, Some(ty)) = (self.found_local_pattern, self.node_matches_type(local.hir_id)) {
             self.found_local_pattern = Some(&*local.pat);
             self.found_ty = Some(ty);
@@ -91,7 +91,7 @@ impl<'a, 'tcx> Visitor<'tcx> for FindLocalByTypeVisitor<'a, 'tcx> {
         intravisit::walk_body(self, body);
     }
 
-    fn visit_expr(&mut self, expr: &'tcx Expr) {
+    fn visit_expr(&mut self, expr: &'tcx Expr<'tcx>) {
         if self.node_matches_type(expr.hir_id).is_some() {
             match expr.kind {
                 ExprKind::Closure(..) => self.found_closure = Some(&expr.kind),
@@ -461,7 +461,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
     fn annotate_method_call(
         &self,
         segment: &hir::ptr::P<hir::PathSegment>,
-        e: &Expr,
+        e: &Expr<'_>,
         err: &mut DiagnosticBuilder<'_>,
     ) {
         if let (Ok(snippet), Some(tables), None) = (
diff --git a/src/librustc/infer/error_reporting/nice_region_error/util.rs b/src/librustc/infer/error_reporting/nice_region_error/util.rs
index 36e91fa3e37..638c8f52007 100644
--- a/src/librustc/infer/error_reporting/nice_region_error/util.rs
+++ b/src/librustc/infer/error_reporting/nice_region_error/util.rs
@@ -12,7 +12,7 @@ use syntax_pos::Span;
 #[derive(Debug)]
 pub(super) struct AnonymousParamInfo<'tcx> {
     // the parameter corresponding to the anonymous region
-    pub param: &'tcx hir::Param,
+    pub param: &'tcx hir::Param<'tcx>,
     // the type corresponding to the anonymopus region parameter
     pub param_ty: Ty<'tcx>,
     // the ty::BoundRegion corresponding to the anonymous region