about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/usefulness.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-08 09:06:36 +0100
committerGitHub <noreply@github.com>2024-02-08 09:06:36 +0100
commita059dd88bf4bbfa13397966eee3b21973dbb91e7 (patch)
tree9e0c1da15f0f980ea5a82418382eb927f5268e1b /compiler/rustc_pattern_analysis/src/usefulness.rs
parent87e1e05aa1185125c4380bc77965b3d50f506c60 (diff)
parentc636c7ae2cbdf576aa920359f687b9f0716a9418 (diff)
downloadrust-a059dd88bf4bbfa13397966eee3b21973dbb91e7.tar.gz
rust-a059dd88bf4bbfa13397966eee3b21973dbb91e7.zip
Rollup merge of #120739 - lukas-code:pp-dyn-assoc, r=compiler-errors
improve pretty printing for associated items in trait objects

* Don't print a binder in front of associated items, because it's not valid syntax.
  * e.g. print `dyn for<'a> Trait<'a, Assoc = &'a u8>` instead of `dyn for<'a> Trait<'a, for<'a> Assoc = &'a u8>`.
* Don't print associated items that are implied by a supertrait bound.
  * e.g. if we have `trait Sub: Super<Assoc = u8> {}`, then just print `dyn Sub` instead of `dyn Sub<Assoc = u8>`.

I've added the test in the first commit, so you can see the diff of the compiler output in the second commit.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/usefulness.rs')
0 files changed, 0 insertions, 0 deletions