Skip to content

Commit

Permalink
Auto merge of rust-lang#135740 - GuillaumeGomez:rollup-wxdl0jw, r=Gui…
Browse files Browse the repository at this point in the history
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#135446 (further improve panic_immediate_abort by removing rtprintpanic! messages)
 - rust-lang#135491 (Remove dead rustc_allowed_through_unstable_modules for std::os::fd contents)
 - rust-lang#135542 (Add the concrete syntax for precise capturing to 1.82 release notes.)
 - rust-lang#135722 (make it possible to use ci-rustc on tarball sources)
 - rust-lang#135729 (Add debug assertions to compiler profile)
 - rust-lang#135736 (rustdoc: Fix flaky doctest test)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jan 19, 2025
2 parents 39dc268 + f9c28e9 commit db76009
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 49 deletions.
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Language
- [`addr_of(_mut)!` macros and the newly stabilized `&raw (const|mut)` are now safe to use with all static items](https://github.com/rust-lang/rust/pull/125834)
- [size_of_val_raw: for length 0 this is safe to call](https://github.com/rust-lang/rust/pull/126152/)
- [Reorder trait bound modifiers *after* `for<...>` binder in trait bounds](https://github.com/rust-lang/rust/pull/127054/)
- [Stabilize opaque type precise capturing (RFC 3617)](https://github.com/rust-lang/rust/pull/127672)
- [Stabilize `+ use<'lt>` opaque type precise capturing (RFC 3617)](https://github.com/rust-lang/rust/pull/127672)
- [Stabilize `&raw const` and `&raw mut` operators (RFC 2582)](https://github.com/rust-lang/rust/pull/127679)
- [Stabilize unsafe extern blocks (RFC 3484)](https://github.com/rust-lang/rust/pull/127921)
- [Stabilize nested field access in `offset_of!`](https://github.com/rust-lang/rust/pull/128284)
Expand Down
5 changes: 0 additions & 5 deletions library/std/src/os/fd/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ use crate::sys_common::{AsInner, IntoInner};
use crate::{fs, io};

/// Raw file descriptors.
#[rustc_allowed_through_unstable_modules]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(not(target_os = "hermit"))]
pub type RawFd = raw::c_int;
#[rustc_allowed_through_unstable_modules]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(target_os = "hermit")]
pub type RawFd = i32;
Expand All @@ -33,7 +31,6 @@ pub type RawFd = i32;
/// This is only available on unix and WASI platforms and must be imported in
/// order to call the method. Windows platforms have a corresponding
/// `AsRawHandle` and `AsRawSocket` set of traits.
#[rustc_allowed_through_unstable_modules]
#[stable(feature = "rust1", since = "1.0.0")]
pub trait AsRawFd {
/// Extracts the raw file descriptor.
Expand Down Expand Up @@ -67,7 +64,6 @@ pub trait AsRawFd {

/// A trait to express the ability to construct an object from a raw file
/// descriptor.
#[rustc_allowed_through_unstable_modules]
#[stable(feature = "from_raw_os", since = "1.1.0")]
pub trait FromRawFd {
/// Constructs a new instance of `Self` from the given raw file
Expand Down Expand Up @@ -112,7 +108,6 @@ pub trait FromRawFd {

/// A trait to express the ability to consume an object and acquire ownership of
/// its raw file descriptor.
#[rustc_allowed_through_unstable_modules]
#[stable(feature = "into_raw_os", since = "1.4.0")]
pub trait IntoRawFd {
/// Consumes this object, returning the raw underlying file descriptor.
Expand Down
9 changes: 0 additions & 9 deletions library/std/src/os/wasi/io/fd.rs

This file was deleted.

4 changes: 4 additions & 0 deletions library/std/src/os/wasi/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@

#[stable(feature = "io_safety_wasi", since = "1.65.0")]
pub use crate::os::fd::*;

// Tests for this module
#[cfg(test)]
mod tests;
20 changes: 0 additions & 20 deletions library/std/src/os/wasi/io/raw.rs

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions library/std/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ use crate::{mem, panic, sys};
// - nothing (so this macro is a no-op)
macro_rules! rtprintpanic {
($($t:tt)*) => {
#[cfg(not(feature = "panic_immediate_abort"))]
if let Some(mut out) = crate::sys::stdio::panic_output() {
let _ = crate::io::Write::write_fmt(&mut out, format_args!($($t)*));
}
#[cfg(feature = "panic_immediate_abort")]
{
let _ = format_args!($($t)*);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/defaults/config.compiler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ compiler-docs = true
# where adding `debug!()` appears to do nothing.
# However, it makes running the compiler slightly slower.
debug-logging = true
# Enables debug assertions, which guard from many mistakes when working on the compiler.
debug-assertions = true
# Get actually-useful information from backtraces, profiling, etc. with minimal added bytes
debuginfo-level = "line-tables-only"
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
Expand Down
36 changes: 23 additions & 13 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2875,21 +2875,26 @@ impl Config {
allowed_paths.push(":!library");
}

// Look for a version to compare to based on the current commit.
// Only commits merged by bors will have CI artifacts.
let commit = match self.last_modified_commit(&allowed_paths, "download-rustc", if_unchanged)
{
Some(commit) => commit,
None => {
if if_unchanged {
return None;
let commit = if self.rust_info.is_managed_git_subrepository() {
// Look for a version to compare to based on the current commit.
// Only commits merged by bors will have CI artifacts.
match self.last_modified_commit(&allowed_paths, "download-rustc", if_unchanged) {
Some(commit) => commit,
None => {
if if_unchanged {
return None;
}
println!("ERROR: could not find commit hash for downloading rustc");
println!("HELP: maybe your repository history is too shallow?");
println!("HELP: consider setting `rust.download-rustc=false` in config.toml");
println!("HELP: or fetch enough history to include one upstream commit");
crate::exit!(1);
}
println!("ERROR: could not find commit hash for downloading rustc");
println!("HELP: maybe your repository history is too shallow?");
println!("HELP: consider setting `rust.download-rustc=false` in config.toml");
println!("HELP: or fetch enough history to include one upstream commit");
crate::exit!(1);
}
} else {
channel::read_commit_info_file(&self.src)
.map(|info| info.sha.trim().to_owned())
.expect("git-commit-info is missing in the project root")
};

if CiEnv::is_ci() && {
Expand Down Expand Up @@ -2971,6 +2976,11 @@ impl Config {
option_name: &str,
if_unchanged: bool,
) -> Option<String> {
assert!(
self.rust_info.is_managed_git_subrepository(),
"Can't run `Config::last_modified_commit` on a non-git source."
);

// Look for a version to compare to based on the current commit.
// Only commits merged by bors will have CI artifacts.
let commit = get_closest_merge_commit(Some(&self.src), &self.git_config(), &[]).unwrap();
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Warning,
summary: "Some stamp names in the build artifacts may have changed slightly (e.g., from `llvm-finished-building` to `.llvm-stamp`).",
},
ChangeInfo {
change_id: 135729,
severity: ChangeSeverity::Info,
summary: "Change the compiler profile to default to rust.debug-assertions = true",
},
];
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ compile-flags:--test
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
#![allow(rustdoc::invalid_codeblock_attributes)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME

0 comments on commit db76009

Please sign in to comment.