Stop passing traitref/traitpredicate by ref
This commit is contained in:
parent
f8d12d9189
commit
2c0348a0d8
11 changed files with 33 additions and 38 deletions
|
@ -37,7 +37,7 @@ impl<'tcx> Elaborator<'tcx> {
|
|||
let super_predicates =
|
||||
self.tcx.super_predicates_of(trait_ref.def_id()).predicates.iter().filter_map(
|
||||
|&(pred, _)| {
|
||||
let clause = pred.instantiate_supertrait(self.tcx, &trait_ref);
|
||||
let clause = pred.instantiate_supertrait(self.tcx, trait_ref);
|
||||
self.visited.insert(clause).then_some(clause)
|
||||
},
|
||||
);
|
||||
|
|
|
@ -313,7 +313,7 @@ impl<'tcx> Clause<'tcx> {
|
|||
pub fn instantiate_supertrait(
|
||||
self,
|
||||
tcx: TyCtxt<'tcx>,
|
||||
trait_ref: &ty::PolyTraitRef<'tcx>,
|
||||
trait_ref: ty::PolyTraitRef<'tcx>,
|
||||
) -> Clause<'tcx> {
|
||||
// The interaction between HRTB and supertraits is not entirely
|
||||
// obvious. Let me walk you (and myself) through an example.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue