Remove obsolete parse::ast::TypedBody

This commit is contained in:
Richard Feldman 2020-09-07 09:19:25 -04:00
parent c743d031ea
commit 3c39a331d7
4 changed files with 0 additions and 28 deletions

View file

@ -16,10 +16,6 @@ impl<'a> Formattable<'a> for Def<'a> {
}
Body(loc_pattern, loc_expr) => loc_pattern.is_multiline() || loc_expr.is_multiline(),
TypedBody(_loc_pattern, _loc_annotation, _loc_expr) => {
unreachable!("annotations and bodies have not yet been merged into TypedBody");
}
SpaceBefore(sub_def, spaces) | SpaceAfter(sub_def, spaces) => {
spaces.iter().any(|s| is_comment(s)) || sub_def.is_multiline()
}
@ -61,9 +57,6 @@ impl<'a> Formattable<'a> for Def<'a> {
Body(loc_pattern, loc_expr) => {
fmt_body(buf, &loc_pattern.value, &loc_expr.value, indent);
}
TypedBody(_loc_pattern, _loc_annotation, _loc_expr) => {
unreachable!("annotations and bodies have not yet been merged into TypedBody");
}
SpaceBefore(sub_def, spaces) => {
fmt_spaces(buf, spaces.iter(), indent);
sub_def.format(buf, indent);