Update to use new square brace formatting

This commit is contained in:
Richard Feldman 2022-05-22 22:43:50 -04:00
parent 0fae5b0bac
commit 4eec34becf
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
120 changed files with 1149 additions and 1155 deletions

View file

@ -3254,7 +3254,7 @@ mod solve_expr {
toAs toAs
"# "#
), ),
"(a -> b), [ Cons c [ Cons a d, Nil ], Nil ] as d -> [ Cons c [ Cons b e ]*, Nil ]* as e" "(a -> b), [Cons c [Cons a d, Nil], Nil] as d -> [Cons c [Cons b e]*, Nil]* as e",
); );
} }

View file

@ -557,11 +557,7 @@ fn list_swap() {
RocList::<i64>::from_slice(&[]), RocList::<i64>::from_slice(&[]),
RocList<i64> RocList<i64>
); );
assert_evals_to!( assert_evals_to!("List.swap [0] 1 2", RocList::from_slice(&[0]), RocList<i64>);
"List.swap [ 0 ] 1 2",
RocList::from_slice(&[0]),
RocList<i64>
);
assert_evals_to!( assert_evals_to!(
"List.swap [1, 2] 0 1", "List.swap [1, 2] 0 1",
RocList::from_slice(&[2, 1]), RocList::from_slice(&[2, 1]),

View file

@ -2028,7 +2028,7 @@ fn hof_conditional() {
#[test] #[test]
#[cfg(any(feature = "gen-llvm"))] #[cfg(any(feature = "gen-llvm"))]
#[should_panic( #[should_panic(
expected = "Roc failed with message: \"Shadowing { original_region: @57-58, shadow: @90-91 Ident" expected = "Roc failed with message: \"Shadowing { original_region: @55-56, shadow: @88-89 Ident"
)] )]
fn pattern_shadowing() { fn pattern_shadowing() {
assert_evals_to!( assert_evals_to!(
@ -2504,7 +2504,7 @@ fn backpassing_result() {
#[test] #[test]
#[cfg(any(feature = "gen-llvm"))] #[cfg(any(feature = "gen-llvm"))]
#[should_panic(expected = "Shadowing { original_region: @57-58, shadow: @74-75 Ident")] #[should_panic(expected = "Shadowing { original_region: @55-56, shadow: @72-73 Ident")]
fn function_malformed_pattern() { fn function_malformed_pattern() {
assert_evals_to!( assert_evals_to!(
indoc!( indoc!(

View file

@ -1216,7 +1216,7 @@ fn to_expr_report<'b>(
region, region,
Some(expr_region), Some(expr_region),
alloc.concat([ alloc.concat([
alloc.string(format!("The {} argument to ", ith)), alloc.string(format!("The {ith} argument to ")),
this_function.clone(), this_function.clone(),
alloc.text(" is not what I expect:"), alloc.text(" is not what I expect:"),
]), ]),
@ -1224,7 +1224,7 @@ fn to_expr_report<'b>(
alloc.concat([ alloc.concat([
alloc.text("But "), alloc.text("But "),
this_function, this_function,
alloc.string(format!(" needs the {} argument to be:", ith)), alloc.string(format!(" needs the {ith} argument to be:")),
]), ]),
None, None,
) )

View file

@ -544,12 +544,12 @@ mod test_reporting {
The `Booly` name is first defined here: The `Booly` name is first defined here:
1 Booly : [Yes, No] 1 Booly : [Yes, No]
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
But then it's defined a second time here: But then it's defined a second time here:
3 Booly : [Yes, No, Maybe] 3 Booly : [Yes, No, Maybe]
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
Since these aliases have the same name, it's easy to use the wrong one Since these aliases have the same name, it's easy to use the wrong one
on accident. Give one of them a new name. on accident. Give one of them a new name.
@ -3633,10 +3633,8 @@ mod test_reporting {
This `ACons` tag application has the type: This `ACons` tag application has the type:
[ACons (Num (Integer Signed64)) [ [ACons (Num (Integer Signed64)) [BCons (Num (Integer Signed64)) [ACons Str [BCons I64 [ACons I64 (BList I64 I64),
BCons (Num (Integer Signed64)) [ACons Str [BCons I64 [ ANil] as , BNil], ANil], BNil], ANil]
ACons I64 (BList I64 I64), ANil] as , BNil], ANil], BNil],
ANil]
But the type annotation on `x` says it should be: But the type annotation on `x` says it should be:
@ -4564,8 +4562,8 @@ mod test_reporting {
1 f : [ 1 f : [
^ ^
Tag unions look like [Many I64, None], so I was expecting to see a Tag unions look like [Many I64, None], so I was expecting to see a tag
tag name next. name next.
"# "#
), ),
) )
@ -6444,7 +6442,7 @@ All branches in an `if` must have the same type!
1 x : List [Foo Str] 1 x : List [Foo Str]
2 x = List.map [1, 2] Foo 2 x = List.map [1, 2] Foo
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
This `map` call produces: This `map` call produces: