Skip to content

Commit eaa51ae

Browse files
committed
hir: impl Display for HirId
1 parent f573049 commit eaa51ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc/hir/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ impl serialize::UseSpecializedDecodable for HirId {
112112
}
113113
}
114114

115+
impl fmt::Display for HirId {
116+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
117+
write!(f, "{:?}", self)
118+
}
119+
}
120+
115121
// hack to ensure that we don't try to access the private parts of `ItemLocalId` in this module
116122
mod item_local_id_inner {
117123
use rustc_data_structures::indexed_vec::Idx;

0 commit comments

Comments
 (0)