From bc4810d907deef00ea5bd0124272cfcab3975e3c Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Sun, 15 Oct 2017 13:43:06 -0700 Subject: Fix impl Trait Lifetime Handling After this change, impl Trait existentials are desugared to a new `abstract type` definition paired with a set of lifetimes to apply. In-scope generics are included as parents of the `abstract type` generics. Parent regions are replaced with static, and parent regions referenced in the `impl Trait` type are duplicated at the end of the `abstract type`'s generics. --- src/librustc_metadata/encoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/librustc_metadata') diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index 8c40f303b93..d8bdd21a2a0 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -1487,7 +1487,7 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> { fn encode_info_for_ty(&mut self, ty: &hir::Ty) { match ty.node { - hir::TyImplTraitExistential(_) => { + hir::TyImplTraitExistential(..) => { let def_id = self.tcx.hir.local_def_id(ty.id); self.record(def_id, IsolatedEncoder::encode_info_for_anon_ty, def_id); } -- cgit 1.4.1-3-g733a5