X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Finfer%2Ferror_reporting%2Fnice_region_error%2Fplaceholder_error.rs;h=8631236c0e36e8c2f1aa3fd00c4c3188233a640d;hb=fff08cb04389497d254fb40948674cbbee402908;hp=60acbe0afe431935ebf430c6d2dd19d1e83d814a;hpb=3091961621fe4fc06892887b75d867b1bb0ec1ad;p=rust.git diff --git a/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs b/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs index 60acbe0afe4..8631236c0e3 100644 --- a/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs +++ b/src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs @@ -210,11 +210,11 @@ fn try_report_placeholders_trait( _ => (), } - let expected_trait_ref = self.infcx.resolve_type_vars_if_possible(&ty::TraitRef { + let expected_trait_ref = self.infcx.resolve_vars_if_possible(&ty::TraitRef { def_id: trait_def_id, substs: expected_substs, }); - let actual_trait_ref = self.infcx.resolve_type_vars_if_possible(&ty::TraitRef { + let actual_trait_ref = self.infcx.resolve_vars_if_possible(&ty::TraitRef { def_id: trait_def_id, substs: actual_substs, }); @@ -321,14 +321,14 @@ fn explain_actual_impl_that_was_found( ) { // HACK(eddyb) maybe move this in a more central location. #[derive(Copy, Clone)] - struct Highlighted<'a, 'gcx, 'tcx, T> { - tcx: TyCtxt<'a, 'gcx, 'tcx>, + struct Highlighted<'gcx, 'tcx, T> { + tcx: TyCtxt<'gcx, 'tcx>, highlight: RegionHighlightMode, value: T, } - impl<'a, 'gcx, 'tcx, T> Highlighted<'a, 'gcx, 'tcx, T> { - fn map(self, f: impl FnOnce(T) -> U) -> Highlighted<'a, 'gcx, 'tcx, U> { + impl<'gcx, 'tcx, T> Highlighted<'gcx, 'tcx, T> { + fn map(self, f: impl FnOnce(T) -> U) -> Highlighted<'gcx, 'tcx, U> { Highlighted { tcx: self.tcx, highlight: self.highlight, @@ -337,8 +337,11 @@ fn map(self, f: impl FnOnce(T) -> U) -> Highlighted<'a, 'gcx, 'tcx, U> { } } - impl<'a, 'gcx, 'tcx, T> fmt::Display for Highlighted<'a, 'gcx, 'tcx, T> - where T: for<'b, 'c> Print<'gcx, 'tcx, + impl<'gcx, 'tcx, T> fmt::Display for Highlighted<'gcx, 'tcx, T> + where + T: for<'a, 'b, 'c> Print< + 'gcx, + 'tcx, FmtPrinter<'a, 'gcx, 'tcx, &'b mut fmt::Formatter<'c>>, Error = fmt::Error, >,