aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authoroxalica <[email protected]>2021-03-15 16:58:29 +0000
committeroxalica <[email protected]>2021-03-15 17:04:33 +0000
commit7101bada0f90eaf89718461affa583e1736f0099 (patch)
tree63aea633a7fdfa146a4961505ca25bc1a0b33e4d /crates/hir/src
parent87171238c6c528c421f06de8cd7e41ed3b6ff57a (diff)
Fix trait type parameter
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/display.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs
index 0640712de..e3660442c 100644
--- a/crates/hir/src/display.rs
+++ b/crates/hir/src/display.rs
@@ -233,7 +233,13 @@ impl HirDisplay for ConstParam {
233 233
234fn write_generic_params(def: GenericDefId, f: &mut HirFormatter) -> Result<(), HirDisplayError> { 234fn write_generic_params(def: GenericDefId, f: &mut HirFormatter) -> Result<(), HirDisplayError> {
235 let params = f.db.generic_params(def); 235 let params = f.db.generic_params(def);
236 if params.lifetimes.is_empty() && params.types.is_empty() && params.consts.is_empty() { 236 if params.lifetimes.is_empty()
237 && params.consts.is_empty()
238 && params
239 .types
240 .iter()
241 .all(|(_, param)| !matches!(param.provenance, TypeParamProvenance::TypeParamList))
242 {
237 return Ok(()); 243 return Ok(());
238 } 244 }
239 write!(f, "<")?; 245 write!(f, "<")?;