diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-16 12:17:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-16 12:17:53 +0100 |
commit | 468982e45a035c271c40bea9b17c2c202a7efc75 (patch) | |
tree | 96f00583eaa8659a21960fa5fc4717d4d9bf0962 /crates/ra_hir_ty/src/display.rs | |
parent | 8a880230a522b34a0ba7f434f4ad3acdfd3448b1 (diff) | |
parent | b5ce84b17023d27f4e96ec7911aca712db0e000b (diff) |
Merge #5405
5405: Align CallableDefId naming with other ids r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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 | }; |