You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0428]: the name `_2_2_expects` is defined multiple times
--> src/main.rs:9:5
|
9 | / #[test_matrix(
10 | | [-2, 2],
11 | | [-2, 4]
12 | | )]
| |______^ `_2_2_expects` redefined here
|
= note: `_2_2_expects` must be defined only once in the value namespace of this module
= note: this error originates in the attribute macro `test_matrix` (in Nightly builds, run with -Z macro-backtrace for more info)
Additional context
The error seems to stem from the way the minus signs are translated to function names, because it compiles if the matrix is defined as
#[test_matrix([-1, 2],[-3, 4])]
(these tests compile, but fail for obvious reasons.
The text was updated successfully, but these errors were encountered:
Description
The example usage for
test_matrix
does not compile in version 3.3.1 with rustc 1.77.2.To reproduce
cargo new test_matrix
cargo add --dev test-case
cargo test
Expected behaviour
The tests compile and run without errors
Actual behaviour
The tests don't compile with the error message
Additional context
The error seems to stem from the way the minus signs are translated to function names, because it compiles if the matrix is defined as
(these tests compile, but fail for obvious reasons.
The text was updated successfully, but these errors were encountered: