diff options
author | Timo Freiberg <[email protected]> | 2020-04-25 15:57:59 +0100 |
---|---|---|
committer | Timo Freiberg <[email protected]> | 2020-05-08 16:12:18 +0100 |
commit | fe93675e8ac2b55d051156151489dbe0496efec3 (patch) | |
tree | d01e03cd79aff92b553a25ba58b2e4b95262ab5d /crates/ra_hir | |
parent | d3eb9d8eafbebca7da95fa8a4813b92eb5080500 (diff) |
New HirDisplay method for displaying sourcecode
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 5f480c304..be18c845c 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -22,8 +22,11 @@ use hir_expand::{ | |||
22 | MacroDefId, MacroDefKind, | 22 | MacroDefId, MacroDefKind, |
23 | }; | 23 | }; |
24 | use hir_ty::{ | 24 | use hir_ty::{ |
25 | autoderef, display::HirFormatter, expr::ExprValidator, method_resolution, ApplicationTy, | 25 | autoderef, |
26 | Canonical, InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, | 26 | display::{HirDisplayError, HirFormatter}, |
27 | expr::ExprValidator, | ||
28 | method_resolution, ApplicationTy, Canonical, InEnvironment, Substs, TraitEnvironment, Ty, | ||
29 | TyDefId, TypeCtor, | ||
27 | }; | 30 | }; |
28 | use ra_db::{CrateId, CrateName, Edition, FileId}; | 31 | use ra_db::{CrateId, CrateName, Edition, FileId}; |
29 | use ra_prof::profile; | 32 | use ra_prof::profile; |
@@ -1319,7 +1322,7 @@ impl Type { | |||
1319 | } | 1322 | } |
1320 | 1323 | ||
1321 | impl HirDisplay for Type { | 1324 | impl HirDisplay for Type { |
1322 | fn hir_fmt(&self, f: &mut HirFormatter) -> std::fmt::Result { | 1325 | fn hir_fmt(&self, f: &mut HirFormatter) -> Result<(), HirDisplayError> { |
1323 | self.ty.value.hir_fmt(f) | 1326 | self.ty.value.hir_fmt(f) |
1324 | } | 1327 | } |
1325 | } | 1328 | } |