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
The key-value attributes, which are used by the new syntax (#99), accept only literals on stable compiler. Trying to use any other expression yields the following error message:
error[E0658]: arbitrary expressions in key-value attributes are unstable
note: see issue #78835 rust-lang/rust#78835 for more information
This makes it impossible to set trivial defaults such as None or &[].
Here is the test code:
// rustc 1.51// rstest 0.7.0use rstest::{fixture, rstest};// Old syntax is OK#[fixture(val=1+1)]fnecho(val:i32) -> i32{
val
}// New syntax fails#[fixture]fnecho2(#[default=1+1]val:i32) -> i32{
val
}
The text was updated successfully, but these errors were encountered:
The key-value attributes, which are used by the new syntax (#99), accept only literals on stable compiler. Trying to use any other expression yields the following error message:
error[E0658]: arbitrary expressions in key-value attributes are unstable
note: see issue #78835 rust-lang/rust#78835 for more information
This makes it impossible to set trivial defaults such as
None
or&[]
.Here is the test code:
The text was updated successfully, but these errors were encountered: