mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
fix: skip container header if no generics params
This commit is contained in:
parent
9f70f87d35
commit
ab7c7d4501
1 changed files with 2 additions and 2 deletions
|
@ -36,13 +36,13 @@ impl HirDisplay for Function {
|
|||
|
||||
match container {
|
||||
Some(AssocItemContainer::Trait(trait_)) => {
|
||||
if f.show_container_bounds() {
|
||||
if f.show_container_bounds() && !f.db.generic_params(trait_.id.into()).is_empty() {
|
||||
write_trait_header(&trait_, f)?;
|
||||
f.write_str("\n")?;
|
||||
}
|
||||
}
|
||||
Some(AssocItemContainer::Impl(impl_)) => {
|
||||
if f.show_container_bounds() {
|
||||
if f.show_container_bounds() && !f.db.generic_params(impl_.id.into()).is_empty() {
|
||||
write_impl_header(&impl_, f)?;
|
||||
f.write_str("\n")?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue