Fix trait type parameter
This commit is contained in:
parent
87171238c6
commit
7101bada0f
@ -233,7 +233,13 @@ fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
|
||||
|
||||
fn write_generic_params(def: GenericDefId, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
|
||||
let params = f.db.generic_params(def);
|
||||
if params.lifetimes.is_empty() && params.types.is_empty() && params.consts.is_empty() {
|
||||
if params.lifetimes.is_empty()
|
||||
&& params.consts.is_empty()
|
||||
&& params
|
||||
.types
|
||||
.iter()
|
||||
.all(|(_, param)| !matches!(param.provenance, TypeParamProvenance::TypeParamList))
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
write!(f, "<")?;
|
||||
|
Loading…
Reference in New Issue
Block a user