Skip to content

Commit 7df9d8c

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#135501 - tgross35:stdlib-dependencies-private, r=bjorn3
Inject `compiler_builtins` during postprocessing and ensure it is made private Follow up of rust-lang#135278 Do the following: * Inject `compiler_builtins` during postprocessing, rather than injecting `extern crate compiler_builtins as _` into the AST * Do not make dependencies of `std` private by default (this was added in rust-lang#135278) * Make sure sysroot crates correctly mark their dependencies private/public * Ensure that marking a dependency private makes its dependents private by default as well, unless otherwise specified * Do the `compiler_builtins` update that has been blocked on this There is more detail in the commit messages. This includes the changes I was working on in rust-lang#136226. try-job: test-various try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: i686-mingw-1 try-job: i686-mingw-2
2 parents 85c9853 + a47d161 commit 7df9d8c

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

alloc/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "alloc"
35
version = "0.0.0"
@@ -9,7 +11,7 @@ autobenches = false
911
edition = "2021"
1012

1113
[dependencies]
12-
core = { path = "../core" }
14+
core = { path = "../core", public = true }
1315
compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] }
1416

1517
[dev-dependencies]

std/src/sys/pal/uefi/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ mod uefi_command_internal {
388388
}
389389
}
390390

391-
pub fn start_image(&mut self) -> io::Result<r_efi::efi::Status> {
391+
pub(crate) fn start_image(&mut self) -> io::Result<r_efi::efi::Status> {
392392
self.update_st_crc32()?;
393393

394394
// Use our system table instead of the default one

std/src/sys/pal/uefi/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub(crate) mod system_time_internal {
8484

8585
// This algorithm is based on the one described in the post
8686
// https://blog.reverberate.org/2020/05/12/optimizing-date-algorithms.html
87-
pub const fn uefi_time_to_duration(t: r_efi::system::Time) -> Duration {
87+
pub(crate) const fn uefi_time_to_duration(t: r_efi::system::Time) -> Duration {
8888
assert!(t.month <= 12);
8989
assert!(t.month != 0);
9090

sysroot/Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "sysroot"
35
version = "0.0.0"
46
edition = "2021"
57

68
# this is a dummy crate to ensure that all required crates appear in the sysroot
79
[dependencies]
8-
proc_macro = { path = "../proc_macro" }
10+
proc_macro = { path = "../proc_macro", public = true }
911
profiler_builtins = { path = "../profiler_builtins", optional = true }
10-
std = { path = "../std" }
11-
test = { path = "../test" }
12+
std = { path = "../std", public = true }
13+
test = { path = "../test", public = true }
1214

1315
# Forward features to the `std` crate as necessary
1416
[features]

test/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "test"
35
version = "0.0.0"
46
edition = "2021"
57

68
[dependencies]
79
getopts = { version = "0.2.21", features = ['rustc-dep-of-std'] }
8-
std = { path = "../std" }
9-
core = { path = "../core" }
10+
std = { path = "../std", public = true }
11+
core = { path = "../core", public = true }
1012

1113
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
1214
libc = { version = "0.2.150", default-features = false }

0 commit comments

Comments
 (0)