diff options
author | oxalica <[email protected]> | 2021-03-15 16:58:29 +0000 |
---|---|---|
committer | oxalica <[email protected]> | 2021-03-15 17:04:33 +0000 |
commit | 7101bada0f90eaf89718461affa583e1736f0099 (patch) | |
tree | 63aea633a7fdfa146a4961505ca25bc1a0b33e4d /crates/hir/src | |
parent | 87171238c6c528c421f06de8cd7e41ed3b6ff57a (diff) |
Fix trait type parameter
Diffstat (limited to 'crates/hir/src')
-rw-r--r-- | crates/hir/src/display.rs | 8 |
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 | ||
234 | fn write_generic_params(def: GenericDefId, f: &mut HirFormatter) -> Result<(), HirDisplayError> { | 234 | fn 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, "<")?; |