1
Fork 0

Rollup merge of #99748 - compiler-errors:better-impl-trait-printing, r=fee1-dead

Use full type name instead of just saying `impl Trait` in "captures lifetime" error

I think this is very useful, especially when there's >1 `impl Trait`, and it just means passing around a bit more info that we already have access to.
This commit is contained in:
Dylan DPC 2022-07-26 14:27:00 +05:30 committed by GitHub
commit ad32667bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 52 additions and 50 deletions

View file

@ -966,14 +966,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
#[instrument(skip(self), level = "debug")]
pub fn member_constraint(
&self,
opaque_type_def_id: LocalDefId,
key: ty::OpaqueTypeKey<'tcx>,
definition_span: Span,
hidden_ty: Ty<'tcx>,
region: ty::Region<'tcx>,
in_regions: &Lrc<Vec<ty::Region<'tcx>>>,
) {
self.inner.borrow_mut().unwrap_region_constraints().member_constraint(
opaque_type_def_id,
key,
definition_span,
hidden_ty,
region,