Я имею участок кода:
#[feature(custom_test_frameworks)]
#[test_runner(crate::test_runner)]
#[cfg(test)]
fn test_runner(tests: &[&dyn Fn()]) {
println!("Starting {} tests", tests.len());
for test in tests {
test();
}
}
#[reexport_test_harness_main = "test_main"]
#[test_case]
fn trivial_assertion() {
print!("trivial assertion... ");
assert_eq!(1, 1);
println!("[completed]");
}
но почему то не работает #[feature(custom_test_frameworks)] :
error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature
--> src\main.rs:30:3
|
30 | #[test_case]
| ^^^^^^^^^
|
= note: see issue #50297 for more information
= help: add `#![feature(custom_test_frameworks)]` to the crate attributes to enable
For more information about this error, try `rustc --explain E0658`.
как исправить?