Skip to content

Rollup of 10 pull requests #122151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d013b5a
Stabilize the `#[diagnostic]` namespace and `#[diagnostic::on_unimple…
weiznich Jan 12, 2024
7d428db
AST validation: Improve handling of inherent impls nested within func…
fmease Mar 4, 2024
2149c45
Bubble up the TyCtxtFeed
oli-obk Feb 14, 2024
31d0a64
Keep `TyCtxtFeed` around longer in the resolver
oli-obk Feb 14, 2024
3b9dfd3
Preserve the `Feed` in local tables
oli-obk Feb 14, 2024
30f2ec2
Eliminate all non-CRATE_DEF_ID uses of `feed_def_id`
oli-obk Feb 14, 2024
5a0c46a
Get rid of `feed_local_def_id`
oli-obk Feb 14, 2024
890dd58
Prevent leaking `Feed`s into query results
oli-obk Feb 19, 2024
3845be6
Prevent feeding `CRATE_DEF_ID` queries outside the resolver
oli-obk Feb 19, 2024
c696d4c
Remove a use of feed_local_crate and make it fail if used within queries
oli-obk Feb 19, 2024
ef00fae
Avoid using feed_unit_query from within queries
oli-obk Feb 19, 2024
b69607c
Add missing background color for top-level rust documentation page an…
GuillaumeGomez Mar 6, 2024
4a1f4ff
Include all library files in artifact summary on CI
Kobzol Mar 7, 2024
570376c
Don't pass a break scope to `Builder::break_for_else`
Zalathar Mar 1, 2024
b91ceb8
use file to write llvm linker script
lqd Mar 7, 2024
1c3fe15
record mtime in llvm linker script
lqd Mar 7, 2024
6ebeb1c
remove empty folder
lcnr Mar 7, 2024
de3c965
move mod into folder
lcnr Mar 7, 2024
cd549ae
sync (try_)instantiate_mir_and_normalize_erasing_regions implementation
klensy Mar 7, 2024
2339317
move snapshot handling into mod
lcnr Mar 7, 2024
f9405ed
cleanup imports
lcnr Mar 7, 2024
5ce3db2
make `std::os::unix::ucred` module private
kadiwa4 Mar 7, 2024
b0d7f2b
Rollup merge of #119888 - weiznich:stablize_diagnostic_namespace, r=c…
GuillaumeGomez Mar 7, 2024
4de78d2
Rollup merge of #121089 - oli-obk:create_def_feed, r=petrochenkov
GuillaumeGomez Mar 7, 2024
2e3bde2
Rollup merge of #122004 - fmease:astvalidator-min-fix, r=compiler-errors
GuillaumeGomez Mar 7, 2024
3257e86
Rollup merge of #122087 - GuillaumeGomez:fix-rust-index-page, r=notri…
GuillaumeGomez Mar 7, 2024
fcb2cbc
Rollup merge of #122136 - Kobzol:opt-dist-lookup-logic, r=Mark-Simula…
GuillaumeGomez Mar 7, 2024
57aea38
Rollup merge of #122137 - Zalathar:if-break-scope, r=matthewjasper
GuillaumeGomez Mar 7, 2024
9e92e2a
Rollup merge of #122138 - lqd:llvm-mtime, r=clubby789
GuillaumeGomez Mar 7, 2024
010fc20
Rollup merge of #122141 - klensy:sync-me, r=lcnr
GuillaumeGomez Mar 7, 2024
cc6a570
Rollup merge of #122142 - lcnr:rustc_infer-cleanup, r=compiler-errors
GuillaumeGomez Mar 7, 2024
92d7e02
Rollup merge of #122147 - kadiwa4:private_impl_mods, r=workingjubilee
GuillaumeGomez Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make std::os::unix::ucred module private
  • Loading branch information
kadiwa4 committed Mar 7, 2024
commit 5ce3db22487d2d88f035a939abe1131aedbd9d94
16 changes: 0 additions & 16 deletions library/std/src/os/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,6 @@ pub mod process;
pub mod raw;
pub mod thread;

#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "nto",
))]
pub mod ucred;

/// A prelude for conveniently writing platform-specific code.
///
/// Includes all extension traits, and some important type definitions.
Expand Down
29 changes: 29 additions & 0 deletions library/std/src/os/unix/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ mod listener;
mod stream;
#[cfg(all(test, not(target_os = "emscripten")))]
mod tests;
#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "nto",
))]
mod ucred;

#[stable(feature = "unix_socket", since = "1.10.0")]
pub use self::addr::*;
Expand All @@ -24,3 +38,18 @@ pub use self::datagram::*;
pub use self::listener::*;
#[stable(feature = "unix_socket", since = "1.10.0")]
pub use self::stream::*;
#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "tvos",
target_os = "watchos",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "nto",
))]
#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
pub use self::ucred::*;
33 changes: 9 additions & 24 deletions library/std/src/os/unix/net/stream.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(any(doc, target_os = "android", target_os = "linux"))]
use super::{recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, SocketAncillary};
use super::{sockaddr_un, SocketAddr};
use crate::fmt;
use crate::io::{self, IoSlice, IoSliceMut};
use crate::net::Shutdown;
use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
#[cfg(any(
target_os = "android",
target_os = "linux",
Expand All @@ -17,28 +10,20 @@ use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, Owned
target_os = "netbsd",
target_os = "openbsd"
))]
use crate::os::unix::ucred;
use super::{peer_cred, UCred};
#[cfg(any(doc, target_os = "android", target_os = "linux"))]
use super::{recv_vectored_with_ancillary_from, send_vectored_with_ancillary_to, SocketAncillary};
use super::{sockaddr_un, SocketAddr};
use crate::fmt;
use crate::io::{self, IoSlice, IoSliceMut};
use crate::net::Shutdown;
use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, OwnedFd, RawFd};
use crate::path::Path;
use crate::sys::cvt;
use crate::sys::net::Socket;
use crate::sys_common::{AsInner, FromInner};
use crate::time::Duration;

#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "tvos",
target_os = "macos",
target_os = "watchos",
target_os = "netbsd",
target_os = "openbsd"
))]
pub use ucred::UCred;

/// A Unix stream socket.
///
/// # Examples
Expand Down Expand Up @@ -247,7 +232,7 @@ impl UnixStream {
target_os = "openbsd"
))]
pub fn peer_cred(&self) -> io::Result<UCred> {
ucred::peer_cred(self)
peer_cred(self)
}

/// Sets the read timeout for the socket.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//! Unix peer credentials.

// NOTE: Code in this file is heavily based on work done in PR 13 from the tokio-uds repository on
// GitHub.
//
Expand All @@ -26,21 +24,21 @@ pub struct UCred {
}

#[cfg(any(target_os = "android", target_os = "linux"))]
pub use self::impl_linux::peer_cred;
pub(super) use self::impl_linux::peer_cred;

#[cfg(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd"
))]
pub use self::impl_bsd::peer_cred;
pub(super) use self::impl_bsd::peer_cred;

#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))]
pub use self::impl_mac::peer_cred;
pub(super) use self::impl_mac::peer_cred;

#[cfg(any(target_os = "linux", target_os = "android"))]
pub mod impl_linux {
mod impl_linux {
use super::UCred;
use crate::os::unix::io::AsRawFd;
use crate::os::unix::net::UnixStream;
Expand Down Expand Up @@ -82,7 +80,7 @@ pub mod impl_linux {
target_os = "netbsd",
target_os = "nto",
))]
pub mod impl_bsd {
mod impl_bsd {
use super::UCred;
use crate::io;
use crate::os::unix::io::AsRawFd;
Expand All @@ -99,7 +97,7 @@ pub mod impl_bsd {
}

#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))]
pub mod impl_mac {
mod impl_mac {
use super::UCred;
use crate::os::unix::io::AsRawFd;
use crate::os::unix::net::UnixStream;
Expand Down