1
Fork 0

Rollup merge of #102904 - compiler-errors:rpitit-verbosely, r=cjgillot

Print return-position `impl Trait` in trait verbosely if `-Zverbose`

Makes the behavior a bit closer to regular `impl Trait` printing
This commit is contained in:
Dylan DPC 2022-10-13 18:19:20 +05:30 committed by GitHub
commit dbff6a91c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -637,7 +637,9 @@ pub trait PrettyPrinter<'tcx>:
p!(print_def_path(def_id, &[]));
}
ty::Projection(ref data) => {
if self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder {
if !(self.tcx().sess.verbose() || NO_QUERIES.with(|q| q.get()))
&& self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder
{
return self.pretty_print_opaque_impl_type(data.item_def_id, data.substs);
} else {
p!(print(data))