We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2abf82 commit 2c0cf8bCopy full SHA for 2c0cf8b
src/bootstrap/src/core/builder/mod.rs
@@ -259,12 +259,17 @@ impl PathSet {
259
// internal use only
260
fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool {
261
if let Some(p_kind) = &p.kind {
262
- p.path.ends_with(needle) && *p_kind == module
+ Self::check_path(p, needle) && *p_kind == module
263
} else {
264
- p.path.ends_with(needle)
+ Self::check_path(p, needle)
265
}
266
267
268
+ fn check_path(p: &TaskPath, needle: &Path) -> bool {
269
+ // This order is important for retro-compatibility, as `starts_with` was introduced later.
270
+ p.path.ends_with(needle) || p.path.starts_with(needle)
271
+ }
272
+
273
/// Return all `TaskPath`s in `Self` that contain any of the `needles`, removing the
274
/// matched needles.
275
///
0 commit comments