cl-ast: Separate Display impl for Ty and TyKind
This commit is contained in:
parent
489a1f7944
commit
d07a3e1455
@ -255,7 +255,12 @@ mod display {
|
||||
|
||||
impl Display for Ty {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match &self.kind {
|
||||
self.kind.fmt(f)
|
||||
}
|
||||
}
|
||||
impl Display for TyKind {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
TyKind::Never => "!".fmt(f),
|
||||
TyKind::Empty => "()".fmt(f),
|
||||
TyKind::SelfTy => "Self".fmt(f),
|
||||
|
Loading…
Reference in New Issue
Block a user