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 #127519

Closed
wants to merge 23 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Nadrieril and others added 23 commits June 27, 2024 11:26
previously, we only held a lock for printing the backtrace itself. since all threads were printing to the same file descriptor, that meant random output in the default panic hook would be interleaved with the backtrace. now, we hold the lock for the full duration of the hook, and the output is ordered.
…matthewjasper

Fix regression in the MIR lowering of or-patterns

In rust-lang#126553 I made a silly indexing mistake and regressed the MIR lowering of or-patterns. This fixes it.

r? `@compiler-errors` because I'd like this to be merged quickly 🙏
…dtolnay

impl FusedIterator and a size hint for the error sources iter

cc tracking issue rust-lang#58520
Automatically taint when reporting errors from ItemCtxt

This isn't very robust yet, as you need to use `itemctxt.dcx()` instead of `tcx.dcx()` for it to take effect, but it's at least more convenient than sprinkling `set_tainted_by_errors` calls in individual places.

based on rust-lang#127357

r? `@fmease`
Use verbose style when suggesting changing `const` with `let`
…workingjubilee

fix interleaved output in the default panic hook when multiple threads panic simultaneously

previously, we only held a lock for printing the backtrace itself. since all threads were printing to the same file descriptor, that meant random output in the default panic hook from one thread would be interleaved with the backtrace from another. now, we hold the lock for the full duration of the hook, and the output is ordered.

---

i noticed some odd things while working on this you may or may not already be aware of.

- libbacktrace is included as a submodule instead of a normal rustc crate, and as a result uses `cfg(backtrace_in_std)` instead of a more normal `cfg(feature = "rustc-dep-of-std")`. probably this is left over from before rust used a cargo-based build system?
- the default panic handler uses `trace_unsynchronized`, etc, in `sys::backtrace::print`. as a result, the lock only applies to concurrent *panic handlers*, not concurrent *threads*.  in other words, if another, non-panicking, thread tried to print a backtrace at the same time as the panic handler, we may have UB, especially on windows.
    - we have the option of changing backtrace to enable locking when `backtrace_in_std` is set so we can reuse their lock instead of trying to add our own.
…e-doc, r=fmease

`#[doc(alias)]`'s doc: say that ASCII spaces are allowed

PR rust-lang#77570 allowed ASCII spaces in doc aliases, but the documentation wasn't updated to say so.

The code checking the aliases:
https://github.com/rust-lang/rust/blob/7fdefb804ec300fb605039522a7c0dfc9e7dc366/compiler/rustc_passes/src/check_attr.rs#L693-L704

`@rustbot` label +A-docs
…=Nadrieril

Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`

Just a small fix to the pattern matching tests now that we can. Also contains a small unrelated comment tweak.
…-errors

small search graph refactor

small improvements which shouldn't impact behavior.

r? `@compiler-errors`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jul 9, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jul 9, 2024

📌 Commit 9a1c4cb has been approved by matthiaskrgr

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 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#127028 (Fix regression in the MIR lowering of or-patterns)
 - rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
 - rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
 - rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`)
 - rust-lang#127397 (fix interleaved output in the default panic hook when multiple threads panic simultaneously)
 - rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
 - rust-lang#127508 (small search graph refactor)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jul 9, 2024

⌛ Testing commit 9a1c4cb with merge 5442fcf...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/backtrace/synchronized-panic-handler.rs stdout ----
diff of run.stderr:

1 thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:8:5:
2 oops oh no woe is me
+ stack backtrace:
+    0: rust_begin_unwind
+    1: core::panicking::panic_fmt
+ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
+ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
4 thread '<unnamed>' panicked at $DIR/synchronized-panic-handler.rs:8:5:
5 oops oh no woe is me
+    0: rust_begin_unwind
+    1: core::panicking::panic_fmt
+ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
6 
---
status: exit status: 0
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/synchronized-panic-handler" && RUST_TEST_THREADS="8" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/synchronized-panic-handler/a"
stdout: none
--- stderr -------------------------------
thread '<unnamed>' panicked at /checkout/tests/ui/backtrace/synchronized-panic-handler.rs:8:5:
oops oh no woe is me
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at /checkout/tests/ui/backtrace/synchronized-panic-handler.rs:8:5:
thread '<unnamed>' panicked at /checkout/tests/ui/backtrace/synchronized-panic-handler.rs:8:5:
oops oh no woe is me
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------------------------------------------

@bors
Copy link
Contributor

bors commented Jul 9, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 9, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-myo0fmj branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.