We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 33602e3 + cc7c5ad commit 3b51291Copy full SHA for 3b51291
compiler/rustc_smir/src/stable_mir/ty.rs
@@ -4,10 +4,17 @@ use super::{
4
with, AllocId, DefId,
5
};
6
use crate::rustc_internal::Opaque;
7
+use std::fmt::{self, Debug, Formatter};
8
-#[derive(Copy, Clone, Debug)]
9
+#[derive(Copy, Clone)]
10
pub struct Ty(pub usize);
11
12
+impl Debug for Ty {
13
+ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
14
+ f.debug_struct("Ty").field("id", &self.0).field("kind", &self.kind()).finish()
15
+ }
16
+}
17
+
18
impl Ty {
19
pub fn kind(&self) -> TyKind {
20
with(|context| context.ty_kind(*self))
0 commit comments