diff options
Diffstat (limited to 'crates/hir_def/src/intern.rs')
-rw-r--r-- | crates/hir_def/src/intern.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_def/src/intern.rs b/crates/hir_def/src/intern.rs index abc304ef0..5cc7f2df6 100644 --- a/crates/hir_def/src/intern.rs +++ b/crates/hir_def/src/intern.rs | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | use std::{ | 5 | use std::{ |
6 | collections::HashMap, | 6 | collections::HashMap, |
7 | fmt::{self, Debug}, | 7 | fmt::{self, Debug, Display}, |
8 | hash::{BuildHasherDefault, Hash, Hasher}, | 8 | hash::{BuildHasherDefault, Hash, Hasher}, |
9 | ops::Deref, | 9 | ops::Deref, |
10 | sync::Arc, | 10 | sync::Arc, |
@@ -171,6 +171,12 @@ impl<T: Debug + Internable + ?Sized> Debug for Interned<T> { | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | impl<T: Display + Internable + ?Sized> Display for Interned<T> { | ||
175 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
176 | (*self.arc).fmt(f) | ||
177 | } | ||
178 | } | ||
179 | |||
174 | pub struct InternStorage<T: ?Sized> { | 180 | pub struct InternStorage<T: ?Sized> { |
175 | map: OnceCell<InternMap<T>>, | 181 | map: OnceCell<InternMap<T>>, |
176 | } | 182 | } |