diff options
author | Wilco Kusee <[email protected]> | 2020-07-26 12:06:11 +0100 |
---|---|---|
committer | Wilco Kusee <[email protected]> | 2020-08-14 10:43:11 +0100 |
commit | 36052ce1a1c19379d67600b49d42f2e09e0450a7 (patch) | |
tree | d781f30f699b98953c1596111b3510bea08f1876 /crates/hir_ty/src/traits | |
parent | 10c33275b0c571a27e5858645984611fc5b162bf (diff) |
Lookup adt names
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index 08c2c9a3e..17c83b6a4 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs | |||
@@ -246,7 +246,8 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> { | |||
246 | } | 246 | } |
247 | // FIXME: lookup names | 247 | // FIXME: lookup names |
248 | fn adt_name(&self, struct_id: chalk_ir::AdtId<Interner>) -> String { | 248 | fn adt_name(&self, struct_id: chalk_ir::AdtId<Interner>) -> String { |
249 | format!("Adt_{:?}", struct_id.0).replace("TypeCtorId(", "").replace(")", "") | 249 | let datum = self.db.struct_datum(self.krate, struct_id); |
250 | format!("{:?}", datum.name(&Interner)) | ||
250 | } | 251 | } |
251 | fn assoc_type_name(&self, assoc_ty_id: chalk_ir::AssocTypeId<Interner>) -> String { | 252 | fn assoc_type_name(&self, assoc_ty_id: chalk_ir::AssocTypeId<Interner>) -> String { |
252 | format!("Assoc_{}", assoc_ty_id.0) | 253 | format!("Assoc_{}", assoc_ty_id.0) |