Pretty-print own args of existential projections
This commit is contained in:
parent
c416a6fc73
commit
080c2ca2dc
7 changed files with 50 additions and 20 deletions
|
@ -3119,7 +3119,10 @@ define_print! {
|
|||
|
||||
ty::ExistentialProjection<'tcx> {
|
||||
let name = cx.tcx().associated_item(self.def_id).name;
|
||||
p!(write("{} = ", name), print(self.term))
|
||||
// The args don't contain the self ty (as it has been erased) but the corresp.
|
||||
// generics do as the trait always has a self ty param. We need to offset.
|
||||
let args = &self.args[cx.tcx().generics_of(self.def_id).parent_count - 1..];
|
||||
p!(path_generic_args(|cx| write!(cx, "{name}"), args), " = ", print(self.term))
|
||||
}
|
||||
|
||||
ty::ProjectionPredicate<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue