Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/display.rs')
| -rw-r--r-- | crates/hir-ty/src/display.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir-ty/src/display.rs b/crates/hir-ty/src/display.rs index 41152d9022..95ce36390d 100644 --- a/crates/hir-ty/src/display.rs +++ b/crates/hir-ty/src/display.rs @@ -680,10 +680,7 @@ fn render_const_scalar( memory_map: &MemoryMap, ty: &Ty, ) -> Result<(), HirDisplayError> { - // FIXME: We need to get krate from the final callers of the hir display - // infrastructure and have it here as a field on `f`. - let trait_env = - TraitEnvironment::empty(*f.db.crate_graph().crates_in_topological_order().last().unwrap()); + let trait_env = TraitEnvironment::empty(f.krate()); let ty = normalize(f.db, trait_env.clone(), ty.clone()); match ty.kind(Interner) { TyKind::Scalar(s) => match s { |