We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 687889c commit 6c122f6Copy full SHA for 6c122f6
src/tools/rust-analyzer/crates/hir/src/display.rs
@@ -36,13 +36,13 @@ impl HirDisplay for Function {
36
37
match container {
38
Some(AssocItemContainer::Trait(trait_)) => {
39
- if f.show_container_bounds() {
+ if f.show_container_bounds() && !f.db.generic_params(trait_.id.into()).is_empty() {
40
write_trait_header(&trait_, f)?;
41
f.write_str("\n")?;
42
}
43
44
Some(AssocItemContainer::Impl(impl_)) => {
45
+ if f.show_container_bounds() && !f.db.generic_params(impl_.id.into()).is_empty() {
46
write_impl_header(&impl_, f)?;
47
48
0 commit comments