diff options
| author | bors <bors@rust-lang.org> | 2019-12-29 22:51:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-29 22:51:02 +0000 |
| commit | 2ba0d2acbd6cb01fb07619628882120d5b66bd59 (patch) | |
| tree | 8c3c08d9dd15c50869f1101f4e16d7b35e229ad5 /src/librustc_mir | |
| parent | da3629b05f8f1b425a738bfe9fe9aedd47c5417a (diff) | |
| parent | 71f745852a1e22602bf4964a3d8308043ac46171 (diff) | |
| download | rust-2ba0d2acbd6cb01fb07619628882120d5b66bd59.tar.gz rust-2ba0d2acbd6cb01fb07619628882120d5b66bd59.zip | |
Auto merge of #66942 - cjgillot:hirene-ty, r=Zoxc
Allocate HIR on an arena 3/4 -- Ty This is the third PR in the series started by #66931 and #66936 Once again, commits don't really make sense on their own. They are mostly split by type of compile error. The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-expr...hirene-ty
Diffstat (limited to 'src/librustc_mir')
| -rw-r--r-- | src/librustc_mir/borrow_check/diagnostics/region_name.rs | 16 | ||||
| -rw-r--r-- | src/librustc_mir/hair/pattern/check_match.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/hair/pattern/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/transform/mod.rs | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/librustc_mir/borrow_check/diagnostics/region_name.rs b/src/librustc_mir/borrow_check/diagnostics/region_name.rs index e551e2eb59f..37e2b68692d 100644 --- a/src/librustc_mir/borrow_check/diagnostics/region_name.rs +++ b/src/librustc_mir/borrow_check/diagnostics/region_name.rs @@ -410,7 +410,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { ) -> Option<RegionName> { let mir_hir_id = infcx.tcx.hir().as_local_hir_id(mir_def_id)?; let fn_decl = infcx.tcx.hir().fn_decl_by_hir_id(mir_hir_id)?; - let argument_hir_ty: &hir::Ty = fn_decl.inputs.get(argument_index)?; + let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(argument_index)?; match argument_hir_ty.kind { // This indicates a variable with no type annotation, like // `|x|`... in that case, we can't highlight the type but @@ -504,10 +504,10 @@ impl<'tcx> RegionInferenceContext<'tcx> { tcx: TyCtxt<'tcx>, needle_fr: RegionVid, argument_ty: Ty<'tcx>, - argument_hir_ty: &hir::Ty, + argument_hir_ty: &hir::Ty<'_>, renctx: &mut RegionErrorNamingCtx, ) -> Option<RegionName> { - let search_stack: &mut Vec<(Ty<'tcx>, &hir::Ty)> = + let search_stack: &mut Vec<(Ty<'tcx>, &hir::Ty<'_>)> = &mut vec![(argument_ty, argument_hir_ty)]; while let Some((ty, hir_ty)) = search_stack.pop() { @@ -570,7 +570,7 @@ impl<'tcx> RegionInferenceContext<'tcx> { // just worry about trying to match up the rustc type // with the HIR types: (ty::Tuple(elem_tys), hir::TyKind::Tup(elem_hir_tys)) => { - search_stack.extend(elem_tys.iter().map(|k| k.expect_ty()).zip(elem_hir_tys)); + search_stack.extend(elem_tys.iter().map(|k| k.expect_ty()).zip(*elem_hir_tys)); } (ty::Slice(elem_ty), hir::TyKind::Slice(elem_hir_ty)) @@ -600,9 +600,9 @@ impl<'tcx> RegionInferenceContext<'tcx> { &self, substs: SubstsRef<'tcx>, needle_fr: RegionVid, - last_segment: &'hir hir::PathSegment, + last_segment: &'hir hir::PathSegment<'hir>, renctx: &mut RegionErrorNamingCtx, - search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty)>, + search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>, ) -> Option<RegionName> { // Did the user give explicit arguments? (e.g., `Foo<..>`) let args = last_segment.args.as_ref()?; @@ -647,8 +647,8 @@ impl<'tcx> RegionInferenceContext<'tcx> { &self, substs: SubstsRef<'tcx>, needle_fr: RegionVid, - args: &'hir hir::GenericArgs, - search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty)>, + args: &'hir hir::GenericArgs<'hir>, + search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>, ) -> Option<&'hir hir::Lifetime> { for (kind, hir_arg) in substs.iter().zip(&args.args) { match (kind.unpack(), hir_arg) { diff --git a/src/librustc_mir/hair/pattern/check_match.rs b/src/librustc_mir/hair/pattern/check_match.rs index 47f2b480850..8cf49edd0a2 100644 --- a/src/librustc_mir/hair/pattern/check_match.rs +++ b/src/librustc_mir/hair/pattern/check_match.rs @@ -255,7 +255,7 @@ fn const_not_var( err: &mut DiagnosticBuilder<'_>, tcx: TyCtxt<'_>, pat: &Pat<'_>, - path: &hir::Path, + path: &hir::Path<'_>, ) { let descr = path.res.descr(); err.span_label( diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs index 6dd3c0f80da..c782eda917f 100644 --- a/src/librustc_mir/hair/pattern/mod.rs +++ b/src/librustc_mir/hair/pattern/mod.rs @@ -732,7 +732,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> { /// Takes a HIR Path. If the path is a constant, evaluates it and feeds /// it to `const_to_pat`. Any other path (like enum variants without fields) /// is converted to the corresponding pattern via `lower_variant_or_leaf`. - fn lower_path(&mut self, qpath: &hir::QPath, id: hir::HirId, span: Span) -> Pat<'tcx> { + fn lower_path(&mut self, qpath: &hir::QPath<'_>, id: hir::HirId, span: Span) -> Pat<'tcx> { let ty = self.tables.node_type(id); let res = self.tables.qpath_res(qpath, id); let is_associated_const = match res { diff --git a/src/librustc_mir/transform/mod.rs b/src/librustc_mir/transform/mod.rs index 06d0b8c7292..39647b587f5 100644 --- a/src/librustc_mir/transform/mod.rs +++ b/src/librustc_mir/transform/mod.rs @@ -77,7 +77,7 @@ fn mir_keys(tcx: TyCtxt<'_>, krate: CrateNum) -> &DefIdSet { &mut self, v: &'tcx hir::VariantData<'tcx>, _: ast::Name, - _: &'tcx hir::Generics, + _: &'tcx hir::Generics<'tcx>, _: hir::HirId, _: Span, ) { |
