File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/bootstrap/src/core/builder Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -259,12 +259,17 @@ impl PathSet {
259
259
// internal use only
260
260
fn check ( p : & TaskPath , needle : & Path , module : Kind ) -> bool {
261
261
if let Some ( p_kind) = & p. kind {
262
- p . path . ends_with ( needle) && * p_kind == module
262
+ Self :: check_path ( p , needle) && * p_kind == module
263
263
} else {
264
- p . path . ends_with ( needle)
264
+ Self :: check_path ( p , needle)
265
265
}
266
266
}
267
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
+
268
273
/// Return all `TaskPath`s in `Self` that contain any of the `needles`, removing the
269
274
/// matched needles.
270
275
///
You can’t perform that action at this time.
0 commit comments