Skip to content

Rollup of 9 pull requests #143715

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

Closed
wants to merge 27 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Daniel Bloom and others added 27 commits June 12, 2025 01:13
instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the
panic data. Being a regular C++ exception, it interacts with the C++
exception handling machinery and can be retrieved via
`std::current_exception`, which needs to copy the exception. We can't
support that, so we panic, which throws another exception, which the
C++ runtime tries to copy and store into the exception_ptr, which panics
again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy
function will be dropped without being rethrown, and causes unnecessary
log spam in stderr. Fix this by directly throwing an exception without
data, which doesn't cause log spam and can be dropped without being
rethrown.
now does proper parsing of git's output and falls back to
assuming all files are modified if `git` doesn't work.

accepts a closure so extensions can be checked.
currently this just uses a very simple
extension-based heirustic.
Give a more user-friendly diagnostic about the following:

* Trailing tokens within braces, e.g. `${foo() extra}`
* Missing parentheses, e.g. `${foo}`
* Incorrect number of arguments, with a hint about correct usage.
Change to a structural diagnostic, update the valid list, and move the
valid list to a note.
…=petrochenkov

Fix `proc_macro::Ident`'s handling of `$crate`

This PR is addresses a few minor bugs, all relating to `proc_macro::Ident`'s support for `$crate`. `Ident` currently supports `$crate` (as can be seen in the `mixed-site-span` test), but:
* `proc_macro::Symbol::can_be_raw` is out of sync with `rustc_span::Symbol::can_be_raw`
  * former doesn't cover `$crate` while the latter does cover `kw::DollarCrate`
* `Ident::new` rejects `$crate`
  * This conflicts with the [reference definition](https://doc.rust-lang.org/nightly/reference/macros-by-example.html#r-macro.decl.meta.specifier) of `ident` which includes `$crate`.
  * This also conflicts with the documentation on [`Display for Ident`](https://doc.rust-lang.org/proc_macro/struct.Ident.html#impl-Display-for-Ident) which says the output "should be losslessly convertible back into the same identifier".

This PR fixes the above issues and extends the `mixed-site-span` test to exercise these fixed code paths, as well as validating the different possible spans resolve `$crate`  as expected (for both the new and old `$crate` construction code paths).
… r=petrochenkov

mbe: Rework diagnostics for metavariable expressions

Make the diagnostics for metavariable expressions more user-friendly. This mostly addresses syntactic errors; I will be following up with improvements to `concat(..)`.
tests/codegen/enum/enum-match.rs: accept negative range attribute

The test current fails when `rustc` is built with HEAD LLVM: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/38097/steps/canvas?sid=0197c492-5661-4c42-8ae7-3d789e85c6ca

I suspect the change was caused by llvm/llvm-project@545cdca

`@rustbot` label llvm-main
`tests/ui`: A New Order [23/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895.

r? `@tgross35`
…o, r=Kobzol

tidy: add support for `--extra-checks=auto:` feature

in preparation for rust-lang#142924

also heavily refactored the parsing of the `--extra-checks` argument to warn about improper usage.

cc ``@GuillaumeGomez``

r? ``@Kobzol``
fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations
Add triagebot stdarch mention ping

r? ```@Amanieu```
…isDenton

Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the panic data. Being a regular C++ exception, it interacts with the C++ exception handling machinery and can be retrieved via `std::current_exception`, which needs to copy the exception. We can't support that, so we panic, which throws another exception, which the C++ runtime tries to copy and store into the exception_ptr, which panics again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy function will be dropped without being rethrown, and causes unnecessary log spam in stderr. Fix this by directly throwing an exception without data, which doesn't cause log spam and can be dropped without being rethrown.

Fixes rust-lang#143623.

This also happens to be the solution `@dpaoliello` suggested, though I'm not sure how to handle the commit credit attribution.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool labels Jul 10, 2025
@rustbot rustbot added 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. rollup A PR which is a rollup labels Jul 10, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit 9ec2968 has been approved by tgross35

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 10, 2025
bors added a commit that referenced this pull request Jul 10, 2025
Rollup of 9 pull requests

Successful merges:

 - #141996 (Fix `proc_macro::Ident`'s handling of `$crate`)
 - #142911 (Remove support for dynamic allocas)
 - #142950 (mbe: Rework diagnostics for metavariable expressions)
 - #143270 (tests/codegen/enum/enum-match.rs: accept negative range attribute)
 - #143298 (`tests/ui`: A New Order [23/N])
 - #143398 (tidy: add support for `--extra-checks=auto:` feature)
 - #143632 (fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations)
 - #143644 (Add triagebot stdarch mention ping)
 - #143651 (Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic)

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

bors commented Jul 10, 2025

⌛ Testing commit 9ec2968 with merge e5791df...

@rust-log-analyzer
Copy link
Collaborator

The job i686-gnu-nopt-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] num_bigint test:false 15.004
[RUSTC-TIMING] rand test:false 2.917
[RUSTC-TIMING] indicatif test:false 6.822
   Compiling test-float-parse v0.1.0 (/checkout/src/tools/test-float-parse)
rustc: /checkout/src/llvm-project/llvm/include/llvm/ADT/DenseMap.h:645: bool llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::LookupBucketFor(const LookupKeyT&, BucketT*&) [with LookupKeyT = unsigned int; DerivedT = llvm::SmallDenseMap<unsigned int, unsigned int, 8, llvm::DenseMapInfo<unsigned int>, llvm::detail::DenseMapPair<unsigned int, unsigned int> >; KeyT = unsigned int; ValueT = unsigned int; KeyInfoT = llvm::DenseMapInfo<unsigned int>; BucketT = llvm::detail::DenseMapPair<unsigned int, unsigned int>]: Assertion `!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!"' failed.
[RUSTC-TIMING] rayon test:false 10.624
rustc exited with signal: 6 (SIGABRT) (core dumped)
error: could not compile `rayon` (lib)

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc /checkout/obj/build/bootstrap/debug/rustc --crate-name rayon --edition=2021 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rayon-1.10.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debug-assertions=on --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("web_spin_lock"))' -C metadata=30397bde0e430a83 -C extra-filename=-1315cdec1af369c1 --out-dir /checkout/obj/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -L dependency=/checkout/obj/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/i686-unknown-linux-gnu/stage2-tools/release/deps --extern either=/checkout/obj/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/deps/libeither-1e8e8a540e26891f.rmeta --extern rayon_core=/checkout/obj/build/i686-unknown-linux-gnu/stage2-tools/i686-unknown-linux-gnu/release/deps/librayon_core-868fc1a03c441c83.rmeta --cap-lints allow -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=cfg(bootstrap)' '--check-cfg=cfg(rust_analyzer)' -Zmacro-backtrace -Csplit-debuginfo=off -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Alinker-messages -Zunstable-options -Z binary-dep-depinfo` (exit status: 254)
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] test_float_parse test:false 27.994
Build completed unsuccessfully in 1:13:35
  local time: Thu Jul 10 07:02:08 UTC 2025
  network time: Thu, 10 Jul 2025 07:02:09 GMT

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

💔 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 10, 2025
@tgross35 tgross35 closed this Jul 10, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2025
@tgross35 tgross35 deleted the rollup-5cuwrql branch July 11, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.