Skip to content

Commit 53a33f8

Browse files
committed
std: fix unintended cross-target changes in QuRT support
- Gate restricted_std behind cfg_attr(target_os = "qurt") in test crate - Restore VxWorks-specific error messages for lchown/chroot - Remove spurious reason field from peer_credentials_unix_socket unstable attr
1 parent c017dd6 commit 53a33f8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

library/std/src/os/unix/net/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ pub use self::stream::*;
5555
target_vendor = "apple",
5656
target_os = "cygwin",
5757
))]
58-
#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
58+
#[unstable(feature = "peer_credentials_unix_socket", issue = "42839")]
5959
pub use self::ucred::*;

library/std/src/sys/fs/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,7 +2563,7 @@ pub fn lchown(path: &Path, uid: u32, gid: u32) -> io::Result<()> {
25632563

25642564
#[cfg(target_os = "vxworks")]
25652565
pub fn lchown(_path: &Path, _uid: u32, _gid: u32) -> io::Result<()> {
2566-
Err(io::const_error!(io::ErrorKind::Unsupported, "lchown not supported"))
2566+
Err(io::const_error!(io::ErrorKind::Unsupported, "lchown not supported by vxworks"))
25672567
}
25682568

25692569
#[cfg(not(any(
@@ -2578,7 +2578,7 @@ pub fn chroot(dir: &Path) -> io::Result<()> {
25782578

25792579
#[cfg(target_os = "vxworks")]
25802580
pub fn chroot(_dir: &Path) -> io::Result<()> {
2581-
Err(io::const_error!(io::ErrorKind::Unsupported, "chroot not supported"))
2581+
Err(io::const_error!(io::ErrorKind::Unsupported, "chroot not supported by vxworks"))
25822582
}
25832583

25842584
#[cfg(not(any(target_os = "wasi", target_os = "qurt")))]

library/test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#![feature(panic_can_unwind)]
2727
#![cfg_attr(test, feature(test))]
2828
#![feature(thread_spawn_hook)]
29-
#![feature(restricted_std)]
29+
#![cfg_attr(target_os = "qurt", feature(restricted_std))]
3030
#![allow(internal_features)]
3131
#![warn(rustdoc::unescaped_backticks)]
3232
#![warn(unreachable_pub)]

0 commit comments

Comments
 (0)