Skip to content
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

Rollup of 8 pull requests #127216

Merged
merged 24 commits into from
Jul 1, 2024
Merged

Rollup of 8 pull requests #127216

merged 24 commits into from
Jul 1, 2024

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

StackOverflowExcept1on and others added 24 commits June 20, 2024 14:06
When CI rustc is enabled, bootstrap tries to symlink the rust source (project root)
into target sysroot right before copying it from the CI rustc's sysroot. This becomes
a problem in CI builders (which we currently don't see because they don't use CI rustc)
because the copying part will fail as they run on read-only mode.

This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking
`rustc-src` from the rust source when download-rustc is not enabled.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…-ou-se

Stabilize `PanicInfo::message()` and `PanicMessage`

Resolves rust-lang#66745

This stabilizes the [`PanicInfo::message()`](https://doc.rust-lang.org/nightly/core/panic/struct.PanicInfo.html#method.message) and [`PanicMessage`](https://doc.rust-lang.org/nightly/core/panic/struct.PanicMessage.html).

Demonstration of [custom panic handler](https://github.com/StackOverflowExcept1on/panicker):
```rust
#![no_std]
#![no_main]

extern crate libc;

#[no_mangle]
extern "C" fn main() -> libc::c_int {
    panic!("I just panic every time");
}

#[panic_handler]
fn my_panic(panic_info: &core::panic::PanicInfo) -> ! {
    use arrayvec::ArrayString;
    use core::fmt::Write;

    let message = panic_info.message();
    let location = panic_info.location().unwrap();

    let mut debug_msg = ArrayString::<1024>::new();
    let _ = write!(&mut debug_msg, "panicked with '{message}' at '{location}'");

    if debug_msg.try_push_str("\0").is_ok() {
        unsafe {
            libc::puts(debug_msg.as_ptr() as *const _);
        }
    }

    unsafe { libc::exit(libc::EXIT_FAILURE) }
}
```
```
$ cargo +stage1 run --release
panicked with 'I just panic every time' at 'src/main.rs:8:5'
```

- [x] FCP: rust-lang#66745 (comment)

r? libs-api
…=joshtriplett,calebcartwright

Add nightly style guide section for `precise_capturing` `use<>` syntax

r? style

Tracking:

- rust-lang#123432
linker: Refactor interface for passing arguments to linker

Separate arguments into passed to the underlying linker, to cc wrapper, or supported by both.
Also avoid allocations in all the argument passing functions.

The interfaces would look nicer if not the limitations on returning `&mut Self` in `dyn`-compatible traits, and unnecessary conflicts between `Trait` and `dyn Trait` methods.

try-job: armhf-gnu
try-job: aarch64-gnu
try-job: dist-x86_64-linux
try-job: x86_64-msvc
try-job: i686-msvc
try-job: dist-x86_64-apple
try-job: test-various
Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake`

Also refactors `wasm-abi` and `compressed-debuginfo`.

Part of rust-lang#121876.

r? ``@jieyouxu``

try-job: x86_64-gnu-debug
try-job: dist-various-2
…tion_abs_diff, r=joboet

Stabilize `duration_abs_diff`

Stabilize `duration_abs_diff` following FCP in rust-lang#117618. Closes rust-lang#117618.
…jieyouxu

Use full expr span for return suggestion on type error/ambiguity

We sometimes use parts of an expression rather than the whole thing for an obligation span. For example, a method obligation will just point to the path segment corresponding to the `method` in `rcvr.method(args)`.

So let's not use that assuming it'll point to the *whole* expression span, which we can access from the expr hir id we store in `ObligationCauseCode::WhereClauseInExpr`.

Fixes rust-lang#127109
 improve the way bootstrap handles rustlib components

When CI rustc is enabled, bootstrap tries to symlink the rust source (project root) into target sysroot right before copying it from the CI rustc's sysroot. This becomes a problem in CI builders (which we currently don't see because they don't use CI rustc) because the copying part will fail as [they run on read-only mode](https://github.com/rust-lang/rust/blob/ef3d6fd7002500af0a985f70d3ac5152623c1396/src/ci/docker/run.sh#L233).

This change fixes the problem by copying `rustc-src` from the CI rustc sysroot and only symlinking `rustc-src` from the rust source when download-rustc is not enabled.

r? ``@Kobzol`` (we talked about this already on Zulip, he knows the context)

Blocker for rust-lang#122709
…pport, r=Kobzol

Improve run-make-support API

I think I'll slowly continue this work. Makes things a bit nicer for contributors, so why not. :D

r? ``@Kobzol``
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 1, 2024
@rustbot rustbot added T-style Relevant to the style team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 1, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Jul 1, 2024

📌 Commit a509b5a has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2024
@bors
Copy link
Contributor

bors commented Jul 1, 2024

⌛ Testing commit a509b5a with merge cf2df68...

@bors
Copy link
Contributor

bors commented Jul 1, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing cf2df68 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 1, 2024
@bors bors merged commit cf2df68 into rust-lang:master Jul 1, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 1, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#126732 Stabilize PanicInfo::message() and PanicMessage 060044d458b0e89da22c605959d0bb8f3fb68c25 (link)
#126753 Add nightly style guide section for precise_capturing `us… 76990c3258f0041502735e41fe89765070accbb9 (link)
#126832 linker: Refactor interface for passing arguments to linker a34bf58c527d798e0e7a251c7d5896ad96d45b04 (link)
#126880 Migrate volatile-intrinsics, weird-output-filenames, `w… 5a2536f605fbaa8dc0b98a976b1b6588dc508c6f (link)
#127128 Stabilize duration_abs_diff b14dddb99a08dfbf695c8941b5ced317d3f9203c (link)
#127129 Use full expr span for return suggestion on type error/ambi… 20091de5bd13acedad01341c5b6e8b204a7be872 (link)
#127188 improve the way bootstrap handles rustlib components 1b4e2cc34fd8668f39c45791b33c58b87b09f596 (link)
#127201 Improve run-make-support API bac95ba9e3e229e148d121581b10de5aa644fe4a (link)

previous master: 221e2741c3

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cf2df68): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.5%, -0.5%] 1

Cycles

Results (secondary 5.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.2% [2.8%, 6.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 695.345s -> 694.524s (-0.12%)
Artifact size: 327.55 MiB -> 327.56 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants