Skip to content

Commit

Permalink
Rollup merge of rust-lang#134252 - hermit-os:hermit-is_absolute, r=tg…
Browse files Browse the repository at this point in the history
…ross35

Fix `Path::is_absolute` on Hermit

Paths on Hermit work like paths on Unix.

Closes rust-lang#132141.
  • Loading branch information
matthiaskrgr authored Dec 13, 2024
2 parents 34bac6c + 907846e commit bde18c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,9 @@ impl Path {
// FIXME: Allow Redox prefixes
self.has_root() || has_redox_scheme(self.as_u8_slice())
} else {
self.has_root() && (cfg!(any(unix, target_os = "wasi")) || self.prefix().is_some())
self.has_root()
&& (cfg!(any(unix, target_os = "hermit", target_os = "wasi"))
|| self.prefix().is_some())
}
}

Expand Down

0 comments on commit bde18c6

Please sign in to comment.