about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2019-02-18 10:41:10 +0100
committerljedrz <ljedrz@gmail.com>2019-02-24 07:50:13 +0100
commit904a91c496b582edbf172ebae5165a58e150b1c3 (patch)
tree26ad38be6e5466206bfcab7b3848cfab44b51efa /src/librustc
parentf573049729ca7f4a4977e48467156d7fc8b13f62 (diff)
downloadrust-904a91c496b582edbf172ebae5165a58e150b1c3.tar.gz
rust-904a91c496b582edbf172ebae5165a58e150b1c3.zip
hir: impl Display for HirId
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/hir/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs
index d0b92587b59..f8b85d13c7f 100644
--- a/src/librustc/hir/mod.rs
+++ b/src/librustc/hir/mod.rs
@@ -112,6 +112,12 @@ impl serialize::UseSpecializedDecodable for HirId {
     }
 }
 
+impl fmt::Display for HirId {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "{:?}", self)
+    }
+}
+
 // hack to ensure that we don't try to access the private parts of `ItemLocalId` in this module
 mod item_local_id_inner {
     use rustc_data_structures::indexed_vec::Idx;