Stop passing traitref/traitpredicate by ref
This commit is contained in:
parent
f8d12d9189
commit
2c0348a0d8
11 changed files with 33 additions and 38 deletions
|
@ -546,7 +546,7 @@ impl<T> Trait<T> for X {
|
|||
for pred in hir_generics.bounds_for_param(def_id) {
|
||||
if self.constrain_generic_bound_associated_type_structured_suggestion(
|
||||
diag,
|
||||
&trait_ref,
|
||||
trait_ref,
|
||||
pred.bounds,
|
||||
assoc,
|
||||
assoc_args,
|
||||
|
@ -715,7 +715,7 @@ fn foo(&self) -> Self::T { String::new() }
|
|||
|
||||
self.constrain_generic_bound_associated_type_structured_suggestion(
|
||||
diag,
|
||||
&trait_ref,
|
||||
trait_ref,
|
||||
opaque_hir_ty.bounds,
|
||||
assoc,
|
||||
assoc_args,
|
||||
|
@ -869,7 +869,7 @@ fn foo(&self) -> Self::T { String::new() }
|
|||
fn constrain_generic_bound_associated_type_structured_suggestion(
|
||||
&self,
|
||||
diag: &mut Diag<'_>,
|
||||
trait_ref: &ty::TraitRef<'tcx>,
|
||||
trait_ref: ty::TraitRef<'tcx>,
|
||||
bounds: hir::GenericBounds<'_>,
|
||||
assoc: ty::AssocItem,
|
||||
assoc_args: &[ty::GenericArg<'tcx>],
|
||||
|
|
|
@ -285,8 +285,7 @@ impl<'tcx, O: Elaboratable<'tcx>> Elaborator<'tcx, O> {
|
|||
let obligations =
|
||||
predicates.predicates.iter().enumerate().map(|(index, &(clause, span))| {
|
||||
elaboratable.child_with_derived_cause(
|
||||
clause
|
||||
.instantiate_supertrait(tcx, &bound_clause.rebind(data.trait_ref)),
|
||||
clause.instantiate_supertrait(tcx, bound_clause.rebind(data.trait_ref)),
|
||||
span,
|
||||
bound_clause.rebind(data),
|
||||
index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue