mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #133492 - MarcoIeni:bootstrap-path-check, r=onur-ozkan
bootstrap: allow skipping steps with start of path
This commit is contained in:
@@ -258,11 +258,11 @@ fn has(&self, needle: &Path, module: Kind) -> bool {
|
||||
|
||||
// internal use only
|
||||
fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool {
|
||||
if let Some(p_kind) = &p.kind {
|
||||
p.path.ends_with(needle) && *p_kind == module
|
||||
} else {
|
||||
p.path.ends_with(needle)
|
||||
}
|
||||
let check_path = || {
|
||||
// This order is important for retro-compatibility, as `starts_with` was introduced later.
|
||||
p.path.ends_with(needle) || p.path.starts_with(needle)
|
||||
};
|
||||
if let Some(p_kind) = &p.kind { check_path() && *p_kind == module } else { check_path() }
|
||||
}
|
||||
|
||||
/// Return all `TaskPath`s in `Self` that contain any of the `needles`, removing the
|
||||
|
||||
Reference in New Issue
Block a user