about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-07 02:56:46 +0000
committerbors <bors@rust-lang.org>2025-03-07 02:56:46 +0000
commit91a0e1604f343730022bc903cbf201d8b0a86a71 (patch)
treeee6471d24c2feb4f8ffbbc625e143ffe5eadfec9 /src/bootstrap
parent98a48781feb1220c0cf2feea23f9ef92cdfa7437 (diff)
parente6d18561aae0e28551850a5395afeed9179d3fae (diff)
downloadrust-91a0e1604f343730022bc903cbf201d8b0a86a71.tar.gz
rust-91a0e1604f343730022bc903cbf201d8b0a86a71.zip
Auto merge of #138127 - compiler-errors:rollup-kcarqrz, r=compiler-errors
Rollup of 17 pull requests

Successful merges:

 - #137827 (Add timestamp to unstable feature usage metrics)
 - #138041 (bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported)
 - #138046 (trim channel value in `get_closest_merge_commit`)
 - #138053 (Increase the max. custom try jobs requested to `20`)
 - #138061 (triagebot: add a `compiler_leads` ad-hoc group)
 - #138064 (Remove - from xtensa targets cpu names)
 - #138075 (Use final path segment for diagnostic)
 - #138078 (Reduce the noise of bootstrap changelog warnings in --dry-run mode)
 - #138081 (Move `yield` expressions behind their own feature gate)
 - #138090 (`librustdoc`: flatten nested ifs)
 - #138092 (Re-add `DynSend` and `DynSync` impls for `TyCtxt`)
 - #138094 (a small borrowck cleanup)
 - #138098 (Stabilize feature `const_copy_from_slice`)
 - #138103 (Git ignore citool's target directory)
 - #138105 (Fix broken link to Miri intrinsics in documentation)
 - #138108 (Mention me (WaffleLapkin) when changes to `rustc_codegen_ssa` occur)
 - #138117 ([llvm/PassWrapper] use `size_t` when building arg strings)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/bin/main.rs13
-rw-r--r--src/bootstrap/src/bin/rustc.rs2
-rw-r--r--src/bootstrap/src/utils/job.rs4
3 files changed, 10 insertions, 9 deletions
diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs
index 38b380e3db8..6f6aaa878ef 100644
--- a/src/bootstrap/src/bin/main.rs
+++ b/src/bootstrap/src/bin/main.rs
@@ -70,11 +70,12 @@ fn main() {
     }
 
     // check_version warnings are not printed during setup, or during CI
-    let changelog_suggestion = if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() {
-        None
-    } else {
-        check_version(&config)
-    };
+    let changelog_suggestion =
+        if matches!(config.cmd, Subcommand::Setup { .. }) || CiEnv::is_ci() || config.dry_run() {
+            None
+        } else {
+            check_version(&config)
+        };
 
     // NOTE: Since `./configure` generates a `config.toml`, distro maintainers will see the
     // changelog warning, not the `x.py setup` message.
@@ -187,7 +188,7 @@ fn check_version(config: &Config) -> Option<String> {
             "update `config.toml` to use `change-id = {latest_change_id}` instead"
         ));
 
-        if io::stdout().is_terminal() && !config.dry_run() {
+        if io::stdout().is_terminal() {
             t!(fs::write(warned_id_path, latest_change_id.to_string()));
         }
     } else {
diff --git a/src/bootstrap/src/bin/rustc.rs b/src/bootstrap/src/bin/rustc.rs
index 61045067592..d8cae02456c 100644
--- a/src/bootstrap/src/bin/rustc.rs
+++ b/src/bootstrap/src/bin/rustc.rs
@@ -349,7 +349,7 @@ fn format_rusage_data(child: Child) -> Option<String> {
     let mut kernel_filetime = Default::default();
     let mut kernel_time = Default::default();
     let mut memory_counters = PROCESS_MEMORY_COUNTERS::default();
-    let memory_counters_size = std::mem::size_of_val(&memory_counters);
+    let memory_counters_size = size_of_val(&memory_counters);
 
     unsafe {
         GetProcessTimes(
diff --git a/src/bootstrap/src/utils/job.rs b/src/bootstrap/src/utils/job.rs
index 10efed130d6..a60e889fd57 100644
--- a/src/bootstrap/src/utils/job.rs
+++ b/src/bootstrap/src/utils/job.rs
@@ -42,7 +42,7 @@ pub unsafe fn setup(build: &mut crate::Build) {
 #[cfg(windows)]
 mod for_windows {
     use std::ffi::c_void;
-    use std::{io, mem};
+    use std::io;
 
     use windows::Win32::Foundation::CloseHandle;
     use windows::Win32::System::Diagnostics::Debug::{
@@ -82,7 +82,7 @@ mod for_windows {
             job,
             JobObjectExtendedLimitInformation,
             &info as *const _ as *const c_void,
-            mem::size_of_val(&info) as u32,
+            size_of_val(&info) as u32,
         );
         assert!(r.is_ok(), "{}", io::Error::last_os_error());