Skip to content

Commit db76009

Browse files
committed
Auto merge of rust-lang#135740 - GuillaumeGomez:rollup-wxdl0jw, r=GuillaumeGomez
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
2 parents 39dc268 + f9c28e9 commit db76009

File tree

12 files changed

+42
-49
lines changed

12 files changed

+42
-49
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Language
359359
- [`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)
360360
- [size_of_val_raw: for length 0 this is safe to call](https://github.com/rust-lang/rust/pull/126152/)
361361
- [Reorder trait bound modifiers *after* `for<...>` binder in trait bounds](https://github.com/rust-lang/rust/pull/127054/)
362-
- [Stabilize opaque type precise capturing (RFC 3617)](https://github.com/rust-lang/rust/pull/127672)
362+
- [Stabilize `+ use<'lt>` opaque type precise capturing (RFC 3617)](https://github.com/rust-lang/rust/pull/127672)
363363
- [Stabilize `&raw const` and `&raw mut` operators (RFC 2582)](https://github.com/rust-lang/rust/pull/127679)
364364
- [Stabilize unsafe extern blocks (RFC 3484)](https://github.com/rust-lang/rust/pull/127921)
365365
- [Stabilize nested field access in `offset_of!`](https://github.com/rust-lang/rust/pull/128284)

library/std/src/os/fd/raw.rs

-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ use crate::sys_common::{AsInner, IntoInner};
1919
use crate::{fs, io};
2020

2121
/// Raw file descriptors.
22-
#[rustc_allowed_through_unstable_modules]
2322
#[stable(feature = "rust1", since = "1.0.0")]
2423
#[cfg(not(target_os = "hermit"))]
2524
pub type RawFd = raw::c_int;
26-
#[rustc_allowed_through_unstable_modules]
2725
#[stable(feature = "rust1", since = "1.0.0")]
2826
#[cfg(target_os = "hermit")]
2927
pub type RawFd = i32;
@@ -33,7 +31,6 @@ pub type RawFd = i32;
3331
/// This is only available on unix and WASI platforms and must be imported in
3432
/// order to call the method. Windows platforms have a corresponding
3533
/// `AsRawHandle` and `AsRawSocket` set of traits.
36-
#[rustc_allowed_through_unstable_modules]
3734
#[stable(feature = "rust1", since = "1.0.0")]
3835
pub trait AsRawFd {
3936
/// Extracts the raw file descriptor.
@@ -67,7 +64,6 @@ pub trait AsRawFd {
6764

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

113109
/// A trait to express the ability to consume an object and acquire ownership of
114110
/// its raw file descriptor.
115-
#[rustc_allowed_through_unstable_modules]
116111
#[stable(feature = "into_raw_os", since = "1.4.0")]
117112
pub trait IntoRawFd {
118113
/// Consumes this object, returning the raw underlying file descriptor.

library/std/src/os/wasi/io/fd.rs

-9
This file was deleted.

library/std/src/os/wasi/io/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44

55
#[stable(feature = "io_safety_wasi", since = "1.65.0")]
66
pub use crate::os::fd::*;
7+
8+
// Tests for this module
9+
#[cfg(test)]
10+
mod tests;

library/std/src/os/wasi/io/raw.rs

-20
This file was deleted.
File renamed without changes.

library/std/src/rt.rs

+5
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ use crate::{mem, panic, sys};
3232
// - nothing (so this macro is a no-op)
3333
macro_rules! rtprintpanic {
3434
($($t:tt)*) => {
35+
#[cfg(not(feature = "panic_immediate_abort"))]
3536
if let Some(mut out) = crate::sys::stdio::panic_output() {
3637
let _ = crate::io::Write::write_fmt(&mut out, format_args!($($t)*));
3738
}
39+
#[cfg(feature = "panic_immediate_abort")]
40+
{
41+
let _ = format_args!($($t)*);
42+
}
3843
}
3944
}
4045

src/bootstrap/defaults/config.compiler.toml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ compiler-docs = true
88
# where adding `debug!()` appears to do nothing.
99
# However, it makes running the compiler slightly slower.
1010
debug-logging = true
11+
# Enables debug assertions, which guard from many mistakes when working on the compiler.
12+
debug-assertions = true
1113
# Get actually-useful information from backtraces, profiling, etc. with minimal added bytes
1214
debuginfo-level = "line-tables-only"
1315
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.

src/bootstrap/src/core/config/config.rs

+23-13
Original file line numberDiff line numberDiff line change
@@ -2875,21 +2875,26 @@ impl Config {
28752875
allowed_paths.push(":!library");
28762876
}
28772877

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

28952900
if CiEnv::is_ci() && {
@@ -2971,6 +2976,11 @@ impl Config {
29712976
option_name: &str,
29722977
if_unchanged: bool,
29732978
) -> Option<String> {
2979+
assert!(
2980+
self.rust_info.is_managed_git_subrepository(),
2981+
"Can't run `Config::last_modified_commit` on a non-git source."
2982+
);
2983+
29742984
// Look for a version to compare to based on the current commit.
29752985
// Only commits merged by bors will have CI artifacts.
29762986
let commit = get_closest_merge_commit(Some(&self.src), &self.git_config(), &[]).unwrap();

src/bootstrap/src/utils/change_tracker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
335335
severity: ChangeSeverity::Warning,
336336
summary: "Some stamp names in the build artifacts may have changed slightly (e.g., from `llvm-finished-building` to `.llvm-stamp`).",
337337
},
338+
ChangeInfo {
339+
change_id: 135729,
340+
severity: ChangeSeverity::Info,
341+
summary: "Change the compiler profile to default to rust.debug-assertions = true",
342+
},
338343
];

tests/rustdoc-ui/doctest/doctest-no-run-invalid-langstring-124577.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ compile-flags:--test
2+
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
23
//@ check-pass
34
#![allow(rustdoc::invalid_codeblock_attributes)]
45

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
running 0 tests
33

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

0 commit comments

Comments
 (0)