Test whether the rustc at `var("RUSTC")` supports the given feature.
(feature: &str)
| 225 | |
| 226 | /// Test whether the rustc at `var("RUSTC")` supports the given feature. |
| 227 | fn has_feature(feature: &str) -> bool { |
| 228 | can_compile(format!( |
| 229 | "#![allow(stable_features)]\n#![feature({})]", |
| 230 | feature |
| 231 | )) |
| 232 | } |
| 233 | |
| 234 | /// Test whether the rustc at `var("RUSTC")` can compile the given code. |
| 235 | fn can_compile<T: AsRef<str>>(test: T) -> bool { |
no test coverage detected