mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Commit local changes (whoops!)
This commit is contained in:
parent
04d4a8ca79
commit
4df0880e7a
9 changed files with 41 additions and 33 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::spaces::{fmt_comments_only, fmt_spaces, newline, NewlineAt, INDENT};
|
||||
use bumpalo::collections::String;
|
||||
use roc_parse::ast::{AssignedField, Expr, Tag, TypeAnnotation, Collection};
|
||||
use roc_parse::ast::{AssignedField, Collection, Expr, Tag, TypeAnnotation};
|
||||
use roc_region::all::Located;
|
||||
|
||||
/// Does an AST node need parens around it?
|
||||
|
@ -183,10 +183,7 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> {
|
|||
Apply(_, _, args) => args.iter().any(|loc_arg| loc_arg.value.is_multiline()),
|
||||
As(lhs, _, rhs) => lhs.value.is_multiline() || rhs.value.is_multiline(),
|
||||
|
||||
Record {
|
||||
fields,
|
||||
ext,
|
||||
} => {
|
||||
Record { fields, ext } => {
|
||||
match ext {
|
||||
Some(ann) if ann.value.is_multiline() => return true,
|
||||
_ => {}
|
||||
|
@ -295,7 +292,11 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> {
|
|||
}
|
||||
|
||||
Record {
|
||||
fields: Collection { items, final_comments },
|
||||
fields:
|
||||
Collection {
|
||||
items,
|
||||
final_comments,
|
||||
},
|
||||
ext,
|
||||
} => {
|
||||
format_sequence!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue