Add compile error for enabling static tests with wrong version of Rust.
@@ -436,6 +436,10 @@ mod tests {
#[ignore]
fn static_test() { static_test_impl() }
+ #[rustversion::not(beta)]
+ #[cfg(feature = "enable-static-tests")]
+ compile_error!("The `enable-static-tests` feature can only be enabled with the Rust beta toolchain.");
+
#[rustversion::not(beta)]
#[test]
#[ignore]
