Test whether the rustc at `var("RUSTC")` supports the given feature.
(feature: &str)
| 34 | |
| 35 | /// Test whether the rustc at `var("RUSTC")` supports the given feature. |
| 36 | fn has_feature(feature: &str) -> bool { |
| 37 | can_compile(format!( |
| 38 | "#![allow(stable_features)]\n#![feature({})]", |
| 39 | feature |
| 40 | )) |
| 41 | } |
| 42 | |
| 43 | /// Test whether the rustc at `var("RUSTC")` can compile the given code. |
| 44 | fn can_compile<T: AsRef<str>>(test: T) -> bool { |
no test coverage detected