Skip to content

Commit

Permalink
Adapt to new compiler error.
Browse files Browse the repository at this point in the history
In the new error structure, mismatched types are ordered the other way around.
  • Loading branch information
Tehforsch committed Jan 8, 2025
1 parent 5998a60 commit 86ddeb2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<f64 as Add<Quantity<f64, Dimension>>>::O
--> tests/compile_fail/type_mismatch_add_type_quantity.rs:7:21
|
7 | let x: () = 1.0 + dimensionless.new(1.0);
| ^ expected `Quantity<f64, Dimension>`, found `()`
| ^ expected `()`, found `Quantity<f64, Dimension>`
|
= note: expected struct `Quantity<f64, Dimension>`
found unit type `()`
= note: expected unit type `()`
found struct `Quantity<f64, Dimension>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<f64 as Div<Quantity<f64, Dimension>>>::O
--> tests/compile_fail/type_mismatch_div_quantity_type.rs:7:21
|
7 | let x: () = 1.0 / dimensionless.new(1.0);
| ^ expected `Quantity<f64, Dimension>`, found `()`
| ^ expected `()`, found `Quantity<f64, Dimension>`
|
= note: expected struct `Quantity<f64, Dimension>`
found unit type `()`
= note: expected unit type `()`
found struct `Quantity<f64, Dimension>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<Quantity<f64, Dimension> as Div<f64>>::O
--> tests/compile_fail/type_mismatch_div_type_quantity.rs:7:40
|
7 | let x: () = dimensionless.new(1.0) / 1.0;
| ^ expected `Quantity<f64, Dimension>`, found `()`
| ^ expected `()`, found `Quantity<f64, Dimension>`
|
= note: expected struct `Quantity<f64, Dimension>`
found unit type `()`
= note: expected unit type `()`
found struct `Quantity<f64, Dimension>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<f64 as Mul<Quantity<f64, Dimension>>>::O
--> tests/compile_fail/type_mismatch_mul_quantity_type.rs:7:21
|
7 | let x: () = 1.0 * dimensionless.new(1.0);
| ^ expected `Quantity<f64, Dimension>`, found `()`
| ^ expected `()`, found `Quantity<f64, Dimension>`
|
= note: expected struct `Quantity<f64, Dimension>`
found unit type `()`
= note: expected unit type `()`
found struct `Quantity<f64, Dimension>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<Quantity<f64, Dimension> as Mul<f64>>::O
--> tests/compile_fail/type_mismatch_mul_type_quantity.rs:7:40
|
7 | let x: () = dimensionless.new(1.0) * 1.0;
| ^ expected `Quantity<f64, Dimension>`, found `()`
| ^ expected `()`, found `Quantity<f64, Dimension>`
|
= note: expected struct `Quantity<f64, Dimension>`
found unit type `()`
= note: expected unit type `()`
found struct `Quantity<f64, Dimension>`

0 comments on commit 86ddeb2

Please sign in to comment.