Skip to content

Commit dbff6a9

Browse files
authored
Rollup merge of rust-lang#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
2 parents 376c81c + 61f0973 commit dbff6a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_middle/src/ty/print/pretty.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,9 @@ pub trait PrettyPrinter<'tcx>:
637637
p!(print_def_path(def_id, &[]));
638638
}
639639
ty::Projection(ref data) => {
640-
if self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder {
640+
if !(self.tcx().sess.verbose() || NO_QUERIES.with(|q| q.get()))
641+
&& self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder
642+
{
641643
return self.pretty_print_opaque_impl_type(data.item_def_id, data.substs);
642644
} else {
643645
p!(print(data))

0 commit comments

Comments
 (0)