fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
- run.all_krates("test").default_condition(builder.config.docs)
+ run.all_krates("test").path("library").default_condition(builder.config.docs)
}
fn make_run(run: RunConfig<'_>) {
.iter()
.map(components_simplified)
.filter_map(|path| {
- if path.get(0) == Some(&"library") {
+ if path.len() >= 2 && path.get(0) == Some(&"library") {
+ // single crate
Some(path[1].to_owned())
} else if !path.is_empty() {
+ // ??
Some(path[0].to_owned())
} else {
+ // all library crates
None
}
})
if self.validate {
cmd.arg("--validate");
}
+ if !builder.unstable_features() {
+ // We need to validate nightly features, even on the stable channel.
+ cmd.env("RUSTC_BOOTSTRAP", "1");
+ }
// If the lib directories are in an unusual location (changed in
// config.toml), then this needs to explicitly update the dylib search
// path.