diff options
Diffstat (limited to 'crates/ra_hir_ty/src/display.rs')
-rw-r--r-- | crates/ra_hir_ty/src/display.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/display.rs b/crates/ra_hir_ty/src/display.rs index c860c254c..758d5f5ac 100644 --- a/crates/ra_hir_ty/src/display.rs +++ b/crates/ra_hir_ty/src/display.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
5 | use crate::{ | 5 | use crate::{ |
6 | db::HirDatabase, utils::generics, ApplicationTy, CallableDef, FnSig, GenericPredicate, | 6 | db::HirDatabase, utils::generics, ApplicationTy, CallableDefId, FnSig, GenericPredicate, |
7 | Obligation, OpaqueTyId, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, | 7 | Obligation, OpaqueTyId, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, |
8 | }; | 8 | }; |
9 | use hir_def::{ | 9 | use hir_def::{ |
@@ -263,9 +263,11 @@ impl HirDisplay for ApplicationTy { | |||
263 | TypeCtor::FnDef(def) => { | 263 | TypeCtor::FnDef(def) => { |
264 | let sig = f.db.callable_item_signature(def).subst(&self.parameters); | 264 | let sig = f.db.callable_item_signature(def).subst(&self.parameters); |
265 | match def { | 265 | match def { |
266 | CallableDef::FunctionId(ff) => write!(f, "fn {}", f.db.function_data(ff).name)?, | 266 | CallableDefId::FunctionId(ff) => { |
267 | CallableDef::StructId(s) => write!(f, "{}", f.db.struct_data(s).name)?, | 267 | write!(f, "fn {}", f.db.function_data(ff).name)? |
268 | CallableDef::EnumVariantId(e) => { | 268 | } |
269 | CallableDefId::StructId(s) => write!(f, "{}", f.db.struct_data(s).name)?, | ||
270 | CallableDefId::EnumVariantId(e) => { | ||
269 | write!(f, "{}", f.db.enum_data(e.parent).variants[e.local_id].name)? | 271 | write!(f, "{}", f.db.enum_data(e.parent).variants[e.local_id].name)? |
270 | } | 272 | } |
271 | }; | 273 | }; |