X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Fdiagnostics%2Fregion_errors.rs;h=e63450a1f58aa02b3172bcd02025a019a7d49cc7;hb=7e8201ae0a57ef63b876cf2bf9ae388426f1dda5;hp=38b16fedd3a49ba4f234b4073e1768622980541b;hpb=e22331ce02d9847a0837bddc074f0e7b5d34db13;p=rust.git diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index 38b16fedd3a..e63450a1f58 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -176,7 +176,7 @@ pub(crate) fn report_region_errors(&mut self, nll_errors: RegionErrors<'tcx>) { // FIXME. We should handle this case better. It // indicates that we have e.g., some region variable // whose value is like `'a+'b` where `'a` and `'b` are - // distinct unrelated univesal regions that are not + // distinct unrelated universal regions that are not // known to outlive one another. It'd be nice to have // some examples where this arises to decide how best // to report it; we could probably handle it by @@ -345,8 +345,8 @@ pub(crate) fn report_region_error( ty::Adt(adt, substs) => { let generic_arg = substs[param_index as usize]; let identity_substs = - InternalSubsts::identity_for_item(self.infcx.tcx, adt.did); - let base_ty = self.infcx.tcx.mk_adt(adt, identity_substs); + InternalSubsts::identity_for_item(self.infcx.tcx, adt.did()); + let base_ty = self.infcx.tcx.mk_adt(*adt, identity_substs); let base_generic_arg = identity_substs[param_index as usize]; let adt_desc = adt.descr(); @@ -410,7 +410,7 @@ fn report_fnmut_error( "returns a closure that contains a reference to a captured variable, which then \ escapes the closure body" } - ty::Adt(def, _) if self.infcx.tcx.is_diagnostic_item(sym::gen_future, def.did) => { + ty::Adt(def, _) if self.infcx.tcx.is_diagnostic_item(sym::gen_future, def.did()) => { "returns an `async` block that contains a reference to a captured variable, which then \ escapes the closure body" }