Auto merge of #95702 - Dylan-DPC:rollup-793rz6v, r=Dylan-DPC

Rollup of 8 pull requests

Successful merges:

 - #88025 (ScmCredentials netbsd implementation.)
 - #95473 (track individual proc-macro expansions in the self-profiler)
 - #95547 (caution against ptr-to-int transmutes)
 - #95585 (Explain why `&T` is cloned when `T` is not `Clone`)
 - #95591 (Use revisions to track NLL test output (part 1))
 - #95663 (diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut)
 - #95673 (⬆️ rust-analyzer)
 - #95681 (resolve: Fix resolution of empty paths passed from rustdoc)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors
2022-04-05 22:42:04 +00:00
132 changed files with 955 additions and 447 deletions

View File

@@ -419,6 +419,17 @@ impl Socket {
Ok(passcred != 0)
}
#[cfg(target_os = "netbsd")]
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
setsockopt(self, 0 as libc::c_int, libc::LOCAL_CREDS, passcred as libc::c_int)
}
#[cfg(target_os = "netbsd")]
pub fn passcred(&self) -> io::Result<bool> {
let passcred: libc::c_int = getsockopt(self, 0 as libc::c_int, libc::LOCAL_CREDS)?;
Ok(passcred != 0)
}
#[cfg(not(any(target_os = "solaris", target_os = "illumos")))]
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
let mut nonblocking = nonblocking as libc::c_int;