Rollup merge of #77362 - RReverser:patch-1, r=dtolnay
Fix is_absolute on WASI WASI does not match `cfg(unix)`, but its paths are Unix-like (`/some/path`) and don't have Windows-like prefixes. Without this change, `is_absolute` for any paths, including `/some/path`, was returning `false`on a WASI target, which is obviously not true and undesirable.
This commit is contained in:
commit
55d0959328
@ -1838,7 +1838,7 @@ impl Path {
|
||||
// FIXME: Allow Redox prefixes
|
||||
self.has_root() || has_redox_scheme(self.as_u8_slice())
|
||||
} else {
|
||||
self.has_root() && (cfg!(unix) || self.prefix().is_some())
|
||||
self.has_root() && (cfg!(any(unix, target_os = "wasi")) || self.prefix().is_some())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user