);
let mut err = self.tcx().sess.struct_span_err(
- cause.span(&self.tcx()),
+ cause.span(self.tcx()),
&format!(
"implementation of `{}` is not general enough",
self.tcx().def_path_str(trait_def_id),
_ => (),
}
- 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,
});
) {
// 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<U>(self, f: impl FnOnce(T) -> U) -> Highlighted<'a, 'gcx, 'tcx, U> {
+ impl<'gcx, 'tcx, T> Highlighted<'gcx, 'tcx, T> {
+ fn map<U>(self, f: impl FnOnce(T) -> U) -> Highlighted<'gcx, 'tcx, U> {
Highlighted {
tcx: self.tcx,
highlight: self.highlight,
}
}
- 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,
>,