aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/interner.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-05-09 19:05:43 +0100
committerFlorian Diebold <[email protected]>2021-05-21 16:48:34 +0100
commitaebcf7b5d4a37a08f2a64f7660b7e3d890476dba (patch)
tree95c0a17d309dbdb5021b482c3749460aa49b4d2d /crates/hir_ty/src/interner.rs
parent0f7f1f070584fbdc07a10df47b95b147698551fd (diff)
Better Debug impl for InternedWrapper
Diffstat (limited to 'crates/hir_ty/src/interner.rs')
-rw-r--r--crates/hir_ty/src/interner.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_ty/src/interner.rs b/crates/hir_ty/src/interner.rs
index 7b4119747..8e77378ab 100644
--- a/crates/hir_ty/src/interner.rs
+++ b/crates/hir_ty/src/interner.rs
@@ -15,9 +15,15 @@ use std::{fmt, sync::Arc};
15#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] 15#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
16pub struct Interner; 16pub struct Interner;
17 17
18#[derive(PartialEq, Eq, Hash, Debug)] 18#[derive(PartialEq, Eq, Hash)]
19pub struct InternedWrapper<T>(T); 19pub struct InternedWrapper<T>(T);
20 20
21impl<T: fmt::Debug> fmt::Debug for InternedWrapper<T> {
22 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23 fmt::Debug::fmt(&self.0, f)
24 }
25}
26
21impl<T> std::ops::Deref for InternedWrapper<T> { 27impl<T> std::ops::Deref for InternedWrapper<T> {
22 type Target = T; 28 type Target = T;
23 29