Merge branch 'main' into patch

This commit is contained in:
Shunsuke Shibayama 2022-12-05 17:25:45 +09:00
commit 52c76431ee
55 changed files with 876 additions and 249 deletions

View file

@ -1979,7 +1979,13 @@ impl fmt::Display for TypeSpec {
}
write!(f, "}}")
}
Self::Enum(elems) => write!(f, "{{{elems}}}"),
Self::Enum(elems) => {
write!(f, "{{")?;
for elem in elems.pos_args() {
write!(f, "{}, ", elem.expr)?;
}
write!(f, "}}")
}
Self::Interval { op, lhs, rhs } => write!(f, "{lhs}{}{rhs}", op.inspect()),
Self::Subr(s) => write!(f, "{s}"),
Self::TypeApp { spec, args } => write!(f, "{spec}{args}"),