Skip to content

Conversation

@JonathanBrouwer
Copy link
Contributor

Ports #[should_panic] to the new attribute parsing infrastructure for #131229 (comment)

r? @jdonszelmann

@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2025

jdonszelmann is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. labels Jul 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 11, 2025
@@ -1,4 +1,3 @@
//@ check-pass
Copy link
Contributor Author

@JonathanBrouwer JonathanBrouwer Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change! Malformed should_panic attributes have had the following warning since 2016:

warning: argument must be of the form: `expected = "error message"` --> src/main.rs:5:1 | 5 | #[should_panic(expected = "foo", bar)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: errors in this attribute were erroneously allowed and will become a hard error in a future release 

This PR makes this an error.

As discussed in #142838 (comment), we can make breaking changes as long as we do a crater run. So this PR needs a crater run.

Copy link
Contributor Author

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue is currently NOT solved by this PR.
We can do this in a future PR or now, but we should decide whether this should be a warning or error:
#143799

@bors
Copy link
Collaborator

bors commented Jul 12, 2025

☔ The latest upstream changes (presumably #143810) made this pull request unmergeable. Please resolve the merge conflicts.

@JonathanBrouwer
Copy link
Contributor Author

^ Rebased on #143796
@rustbot ready

I'd propose to do #143799 in a separate PR, as I think it's more likely to fail crater than the change in this PR

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jul 13, 2025
@bors
Copy link
Collaborator

bors commented Jul 14, 2025

☔ The latest upstream changes (presumably #143779) made this pull request unmergeable. Please resolve the merge conflicts.

@JonathanBrouwer JonathanBrouwer force-pushed the should_panic_parser branch 2 times, most recently from bee8d3d to 4b68dc9 Compare July 15, 2025 11:59
@bors
Copy link
Collaborator

bors commented Jul 17, 2025

☔ The latest upstream changes (presumably #144044) made this pull request unmergeable. Please resolve the merge conflicts.

@jdonszelmann
Copy link
Contributor

@bors try

@bors
Copy link
Collaborator

bors commented Jul 17, 2025

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout should_panic_parser (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self should_panic_parser --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging compiler/rustc_passes/src/check_attr.rs Auto-merging compiler/rustc_parse/src/validate_attr.rs Auto-merging compiler/rustc_hir/src/hir.rs Auto-merging compiler/rustc_builtin_macros/src/test.rs CONFLICT (content): Merge conflict in compiler/rustc_builtin_macros/src/test.rs Auto-merging compiler/rustc_attr_parsing/src/context.rs Auto-merging compiler/rustc_attr_data_structures/src/encode_cross_crate.rs Auto-merging compiler/rustc_attr_data_structures/src/attributes.rs Automatic merge failed; fix conflicts and then commit the result. 
@jdonszelmann
Copy link
Contributor

@bors try

bors added a commit that referenced this pull request Jul 17, 2025
Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for #131229 (comment) r? `@jdonszelmann`
@bors
Copy link
Collaborator

bors commented Jul 17, 2025

⌛ Trying commit 877a65d with merge 5de9e0e...

@bors
Copy link
Collaborator

bors commented Jul 17, 2025

☀️ Try build successful - checks-actions
Build commit: 5de9e0e (5de9e0e6cf775e94e0de2003f35e183f3f77bfe8)

@ehuss
Copy link
Contributor

ehuss commented Aug 7, 2025

Does this mean this note should be removed?

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r, r=jdonszelmann Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? `@jdonszelmann`
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r, r=jdonszelmann Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? ``@jdonszelmann``
@traviscross
Copy link
Contributor

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r, r=jdonszelmann Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? `@jdonszelmann`
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 7, 2025
…r, r=jdonszelmann Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for rust-lang#131229 (comment) r? ``@jdonszelmann``
bors added a commit that referenced this pull request Aug 7, 2025
Rollup of 20 pull requests Successful merges: - #137831 (Tweak auto trait errors) - #143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - #143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - #143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - #143906 (Miri: non-deterministic floating point operations in `foreign_items`) - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - #144133 (Stabilize const TypeId::of) - #144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - #144473 (Address libunwind.a inconsistency issues in the bootstrap program) - #144659 (bootstrap: refactor mingw dist and fix gnullvm) - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - #144807 (Streamline config in bootstrap) - #144900 (Stabilize `unsigned_signed_diff` feature) - #144903 (Rename `begin_panic_handler` to `panic_handler`) - #144931 ([win][arm64ec] Fix msvc-wholearchive for Arm64EC) - #144974 (compiler-builtins subtree update) - #144997 (bump bootstrap compiler to 1.90 beta) - #145004 (Couple of minor cleanups) - #145009 (A couple small changes for rust-analyzer next-solver work) - #145014 (Revert "Preserve the .debug_gdb_scripts section") r? `@ghost` `@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Aug 7, 2025
Rollup of 19 pull requests Successful merges: - #137831 (Tweak auto trait errors) - #138689 (add nvptx_target_feature) - #140267 (implement continue_ok and break_ok for ControlFlow) - #143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - #143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - #143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - #143906 (Miri: non-deterministic floating point operations in `foreign_items`) - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - #144133 (Stabilize const TypeId::of) - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - #144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - #144473 (Address libunwind.a inconsistency issues in the bootstrap program) - #144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - #144650 (Additional tce tests) - #144659 (bootstrap: refactor mingw dist and fix gnullvm) - #144682 (Stabilize `strict_overflow_ops`) - #145026 (Update books) - #145033 (Reimplement `print_region` in `type_name.rs`.) - #145040 (rustc-dev-guide subtree update) Failed merges: - #143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
@bors bors merged commit 995ca3e into rust-lang:master Aug 7, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 7, 2025
rust-timer added a commit that referenced this pull request Aug 7, 2025
Rollup merge of #143808 - JonathanBrouwer:should_panic_parser, r=jdonszelmann Port `#[should_panic]` to the new attribute parsing infrastructure Ports `#[should_panic]` to the new attribute parsing infrastructure for #131229 (comment) r? ```@jdonszelmann```
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 8, 2025
Rollup of 19 pull requests Successful merges: - rust-lang/rust#137831 (Tweak auto trait errors) - rust-lang/rust#138689 (add nvptx_target_feature) - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow) - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`) - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - rust-lang/rust#144133 (Stabilize const TypeId::of) - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program) - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - rust-lang/rust#144650 (Additional tce tests) - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm) - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`) - rust-lang/rust#145026 (Update books) - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.) - rust-lang/rust#145040 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=traviscross Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies This has been a warn lint since early 2019 and a deny-by-default lint since late 2019. We're currently transitioning some of the cases where this lint is being produced to a hard error (rust-lang#143607 rust-lang#143808 and more) So let's report this lint in all dependencies for the remaining attributes r? `@traviscross` `@rustbot` labels +I-lang-nominated +T-lang -T-compiler cc `@jdonszelmann` (Separate question: Why does the "Future incompatibility report" only trigger if `report_in_deps` is true, even if the future incompatibility happens in the same crate, is this correct?) This also needs a crater run, but I don't have permissions to trigger this
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=traviscross Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies This has been a warn lint since early 2019 and a deny-by-default lint since late 2019. We're currently transitioning some of the cases where this lint is being produced to a hard error (rust-lang#143607 rust-lang#143808 and more) So let's report this lint in all dependencies for the remaining attributes r? ``@traviscross`` ``@rustbot`` labels +I-lang-nominated +T-lang -T-compiler cc ``@jdonszelmann`` (Separate question: Why does the "Future incompatibility report" only trigger if `report_in_deps` is true, even if the future incompatibility happens in the same crate, is this correct?) This also needs a crater run, but I don't have permissions to trigger this
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=traviscross Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies This has been a warn lint since early 2019 and a deny-by-default lint since late 2019. We're currently transitioning some of the cases where this lint is being produced to a hard error (rust-lang#143607 rust-lang#143808 and more) So let's report this lint in all dependencies for the remaining attributes r? ```@traviscross``` ```@rustbot``` labels +I-lang-nominated +T-lang -T-compiler cc ```@jdonszelmann``` (Separate question: Why does the "Future incompatibility report" only trigger if `report_in_deps` is true, even if the future incompatibility happens in the same crate, is this correct?) This also needs a crater run, but I don't have permissions to trigger this
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=traviscross Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies This has been a warn lint since early 2019 and a deny-by-default lint since late 2019. We're currently transitioning some of the cases where this lint is being produced to a hard error (rust-lang#143607 rust-lang#143808 and more) So let's report this lint in all dependencies for the remaining attributes r? ````@traviscross```` ````@rustbot```` labels +I-lang-nominated +T-lang -T-compiler cc ````@jdonszelmann```` (Separate question: Why does the "Future incompatibility report" only trigger if `report_in_deps` is true, even if the future incompatibility happens in the same crate, is this correct?) This also needs a crater run, but I don't have permissions to trigger this
bors added a commit that referenced this pull request Aug 10, 2025
Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies This has been a warn lint since early 2019 and a deny-by-default lint since late 2019. We're currently transitioning some of the cases where this lint is being produced to a hard error (#143607 #143808 and more) So let's report this lint in all dependencies for the remaining attributes r? `@traviscross` `@rustbot` labels +I-lang-nominated +T-lang -T-compiler cc `@jdonszelmann` (Separate question: Why does the "Future incompatibility report" only trigger if `report_in_deps` is true, even if the future incompatibility happens in the same crate, is this correct?) This also needs a crater run, but I don't have permissions to trigger this
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Aug 11, 2025
Rollup of 19 pull requests Successful merges: - rust-lang/rust#137831 (Tweak auto trait errors) - rust-lang/rust#138689 (add nvptx_target_feature) - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow) - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`) - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - rust-lang/rust#144133 (Stabilize const TypeId::of) - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program) - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - rust-lang/rust#144650 (Additional tce tests) - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm) - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`) - rust-lang/rust#145026 (Update books) - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.) - rust-lang/rust#145040 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 12, 2025
Rollup of 19 pull requests Successful merges: - rust-lang#137831 (Tweak auto trait errors) - rust-lang#138689 (add nvptx_target_feature) - rust-lang#140267 (implement continue_ok and break_ok for ControlFlow) - rust-lang#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - rust-lang#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - rust-lang#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - rust-lang#143906 (Miri: non-deterministic floating point operations in `foreign_items`) - rust-lang#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - rust-lang#144133 (Stabilize const TypeId::of) - rust-lang#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - rust-lang#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - rust-lang#144473 (Address libunwind.a inconsistency issues in the bootstrap program) - rust-lang#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - rust-lang#144650 (Additional tce tests) - rust-lang#144659 (bootstrap: refactor mingw dist and fix gnullvm) - rust-lang#144682 (Stabilize `strict_overflow_ops`) - rust-lang#145026 (Update books) - rust-lang#145033 (Reimplement `print_region` in `type_name.rs`.) - rust-lang#145040 (rustc-dev-guide subtree update) Failed merges: - rust-lang#143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Aug 14, 2025
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 18, 2025
Rollup of 19 pull requests Successful merges: - rust-lang/rust#137831 (Tweak auto trait errors) - rust-lang/rust#138689 (add nvptx_target_feature) - rust-lang/rust#140267 (implement continue_ok and break_ok for ControlFlow) - rust-lang/rust#143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching) - rust-lang/rust#143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order) - rust-lang/rust#143808 (Port `#[should_panic]` to the new attribute parsing infrastructure ) - rust-lang/rust#143906 (Miri: non-deterministic floating point operations in `foreign_items`) - rust-lang/rust#143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps) - rust-lang/rust#144133 (Stabilize const TypeId::of) - rust-lang/rust#144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny) - rust-lang/rust#144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling) - rust-lang/rust#144473 (Address libunwind.a inconsistency issues in the bootstrap program) - rust-lang/rust#144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`) - rust-lang/rust#144650 (Additional tce tests) - rust-lang/rust#144659 (bootstrap: refactor mingw dist and fix gnullvm) - rust-lang/rust#144682 (Stabilize `strict_overflow_ops`) - rust-lang/rust#145026 (Update books) - rust-lang/rust#145033 (Reimplement `print_region` in `type_name.rs`.) - rust-lang/rust#145040 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 4, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [rust](https://github.com/rust-lang/rust) | minor | `1.90.0` -> `1.91.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.91.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1910-2025-10-30) [Compare Source](rust-lang/rust@1.90.0...1.91.0) \========================== <a id="1.91.0-Language"></a> ## Language - [Lower pattern bindings in the order they're written and base drop order on primary bindings' order](rust-lang/rust#143764) - [Stabilize declaration of C-style variadic functions for `sysv64`, `win64`, `efiapi`, and `aapcs` ABIs](rust-lang/rust#144066). This brings these ABIs in line with the C ABI: variadic functions can be declared in extern blocks but not defined. - [Add `dangling_pointers_from_locals` lint to warn against dangling pointers from local variables](rust-lang/rust#144322) - [Upgrade `semicolon_in_expressions_from_macros` from warn to deny](rust-lang/rust#144369) - [Stabilize LoongArch32 inline assembly](rust-lang/rust#144402) - [Add warn-by-default `integer_to_ptr_transmutes` lint against integer-to-pointer transmutes](rust-lang/rust#144531) - [Stabilize `sse4a` and `tbm` target features](rust-lang/rust#144542) - [Add `target_env = "macabi"` and `target_env = "sim"` cfgs](rust-lang/rust#139451) as replacements for the `target_abi` cfgs with the same values. <a id="1.91.0-Compiler"></a> ## Compiler - [Don't warn on never-to-any `as` casts as unreachable](rust-lang/rust#144804) <a id="1.91.0-Platform-Support"></a> ## Platform Support - [Promote `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm` to Tier 2 with host tools.](rust-lang/rust#143031) Note: llvm-tools and MSI installers are missing but will be added in future releases. - [Promote `aarch64-pc-windows-msvc` to Tier 1](rust-lang/rust#145682) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.91.0-Libraries"></a> ## Libraries - [Print thread ID in panic message](rust-lang/rust#115746) - [Fix overly restrictive lifetime in `core::panic::Location::file` return type](rust-lang/rust#132087) - [Guarantee parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp`](rust-lang/rust#139357) - [Document assumptions about `Clone` and `Eq` traits](rust-lang/rust#144330) - [`std::thread`: Return error if setting thread stack size fails](rust-lang/rust#144210) This used to panic within the standard library. <a id="1.91.0-Stabilized-APIs"></a> ## Stabilized APIs - [`Path::file_prefix`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.file_prefix) - [`AtomicPtr::fetch_ptr_add`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_ptr_add) - [`AtomicPtr::fetch_ptr_sub`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_ptr_sub) - [`AtomicPtr::fetch_byte_add`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_byte_add) - [`AtomicPtr::fetch_byte_sub`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_byte_sub) - [`AtomicPtr::fetch_or`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_or) - [`AtomicPtr::fetch_and`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_and) - [`AtomicPtr::fetch_xor`](https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.fetch_xor) - [`{integer}::strict_add`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_add) - [`{integer}::strict_sub`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_sub) - [`{integer}::strict_mul`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_mul) - [`{integer}::strict_div`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_div) - [`{integer}::strict_div_euclid`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_div_euclid) - [`{integer}::strict_rem`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_rem) - [`{integer}::strict_rem_euclid`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_rem_euclid) - [`{integer}::strict_neg`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_neg) - [`{integer}::strict_shl`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_shl) - [`{integer}::strict_shr`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_shr) - [`{integer}::strict_pow`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_pow) - [`i{N}::strict_add_unsigned`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_add_unsigned) - [`i{N}::strict_sub_unsigned`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_sub_unsigned) - [`i{N}::strict_abs`](https://doc.rust-lang.org/stable/std/primitive.i32.html#method.strict_abs) - [`u{N}::strict_add_signed`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_add_signed) - [`u{N}::strict_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.strict_sub_signed) - [`PanicHookInfo::payload_as_str`](https://doc.rust-lang.org/stable/std/panic/struct.PanicHookInfo.html#method.payload_as_str) - [`core::iter::chain`](https://doc.rust-lang.org/stable/core/iter/fn.chain.html) - [`u{N}::checked_signed_diff`](https://doc.rust-lang.org/stable/std/primitive.u16.html#method.checked_signed_diff) - [`core::array::repeat`](https://doc.rust-lang.org/stable/core/array/fn.repeat.html) - [`PathBuf::add_extension`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.add_extension) - [`PathBuf::with_added_extension`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.with_added_extension) - [`Duration::from_mins`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_mins) - [`Duration::from_hours`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_hours) - [`impl PartialEq<str> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3Cstr%3E-for-PathBuf) - [`impl PartialEq<String> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3CString%3E-for-PathBuf) - [`impl PartialEq<str> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3Cstr%3E-for-Path) - [`impl PartialEq<String> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3CString%3E-for-Path) - [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPathBuf%3E-for-String) - [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPath%3E-for-String) - [`impl PartialEq<PathBuf> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPathBuf%3E-for-str) - [`impl PartialEq<Path> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPath%3E-for-str) - [`Ipv4Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.from_octets) - [`Ipv6Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.from_octets) - [`Ipv6Addr::from_segments`](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.from_segments) - [`impl<T> Default for Pin<Box<T>> where Box<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CBox%3CT%3E%3E) - [`impl<T> Default for Pin<Rc<T>> where Rc<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CRc%3CT%3E%3E) - [`impl<T> Default for Pin<Arc<T>> where Arc<T>: Default, T: ?Sized`](https://doc.rust-lang.org/stable/std/default/trait.Default.html#impl-Default-for-Pin%3CArc%3CT%3E%3E) - [`Cell::as_array_of_cells`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.as_array_of_cells) - [`u{N}::carrying_add`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_add) - [`u{N}::borrowing_sub`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.borrowing_sub) - [`u{N}::carrying_mul`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_mul) - [`u{N}::carrying_mul_add`](https://doc.rust-lang.org/stable/std/primitive.u64.html#method.carrying_mul_add) - [`BTreeMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.extract_if) - [`BTreeSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html#method.extract_if) - [`impl Debug for windows::ffi::EncodeWide<'_>`](https://doc.rust-lang.org/stable/std/os/windows/ffi/struct.EncodeWide.html#impl-Debug-for-EncodeWide%3C'_%3E) - [`str::ceil_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.ceil_char_boundary) - [`str::floor_char_boundary`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.floor_char_boundary) - [`impl Sum for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Sum-for-Saturating%3Cu32%3E) - [`impl Sum<&Self> for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Sum%3C%26Saturating%3Cu32%3E%3E-for-Saturating%3Cu32%3E) - [`impl Product for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Product-for-Saturating%3Cu32%3E) - [`impl Product<&Self> for Saturating<u{N}>`](https://doc.rust-lang.org/stable/std/num/struct.Saturating.html#impl-Product%3C%26Saturating%3Cu32%3E%3E-for-Saturating%3Cu32%3E) These previously stable APIs are now stable in const contexts: - [`<[T; N]>::each_ref`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_ref) - [`<[T; N]>::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut) - [`OsString::new`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.new) - [`PathBuf::new`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.new) - [`TypeId::of`](https://doc.rust-lang.org/stable/std/any/struct.TypeId.html#method.of) - [`ptr::with_exposed_provenance`](https://doc.rust-lang.org/stable/std/ptr/fn.with_exposed_provenance.html) - [`ptr::with_exposed_provenance_mut`](https://doc.rust-lang.org/stable/std/ptr/fn.with_exposed_provenance_mut.html) <a id="1.91.0-Cargo"></a> ## Cargo - 🎉 Stabilize `build.build-dir`. This config sets the directory where intermediate build artifacts are stored. These artifacts are produced by Cargo and rustc during the build process. End users usually won't need to interact with them, and the layout inside `build-dir` is an implementation detail that may change without notice. ([config doc](https://doc.rust-lang.org/stable/cargo/reference/config.html#buildbuild-dir)) ([build cache doc](https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#&#8203;15833](rust-lang/cargo#15833) [#&#8203;15840](rust-lang/cargo#15840) - The `--target` flag and the `build.target` configuration can now take literal `"host-tuple"` string, which will internally be substituted by the host machine's target triple. [#&#8203;15838](rust-lang/cargo#15838) [#&#8203;16003](rust-lang/cargo#16003) [#&#8203;16032](rust-lang/cargo#16032) <a id="1.91.0-Rustdoc"></a> ## Rustdoc - [In search results, rank doc aliases lower than non-alias items with the same name](rust-lang/rust#145100) - [Raw pointers now work in type-based search like references](rust-lang/rust#145731). This means you can now search for things like `*const u8 ->`, and additionally functions that take or return raw pointers will now display their signature properly in search results. <a id="1.91.0-Compatibility-Notes"></a> ## Compatibility Notes - [Always require coroutine captures to be drop-live](rust-lang/rust#144156) - [Apple: Always pass SDK root when linking with `cc`, and pass it via `SDKROOT` env var](rust-lang/rust#131477). This should fix linking issues with `rustc` running inside Xcode. Libraries in `/usr/local/lib` may no longer be linked automatically, if you develop or use a crate that relies on this, you should explicitly set `cargo::rustc-link-search=/usr/local/lib` in a `build.rs` script. - [Relaxed bounds in associated type bound position like in `TraitRef<AssocTy: ?Sized>` are now correctly forbidden](rust-lang/rust#135331) - [Add unstable `#[sanitize(xyz = "on|off")]` built-in attribute that shadows procedural macros with the same name](rust-lang/rust#142681) - [Fix the drop checker being more permissive for bindings declared with let-else](rust-lang/rust#143028) - [Be more strict when parsing attributes, erroring on many invalid attributes](rust-lang/rust#144689) - [Error on invalid `#[should_panic]` attributes](rust-lang/rust#143808) - [Error on invalid `#[link]` attributes](rust-lang/rust#143193) - [Mark all deprecation lints in name resolution as deny-by-default and also report in dependencies](rust-lang/rust#143929) - The lint `semicolon_in_expressions_from_macros`, for `macro_rules!` macros in expression position that expand to end in a semicolon (`;`), is now deny-by-default. It was already warn-by-default, and a future compatibility warning (FCW) that warned even in dependencies. This lint will become a hard error in the future. - [Trait impl modifiers (e.g., `unsafe`, `!`, `default`) in inherent impls are no longer syntactically valid](rust-lang/rust#144386) - [Start reporting future breakage for `ill_formed_attribute_input` in dependencies](rust-lang/rust#144544) - [Restrict the scope of temporaries created by the macros `pin!`, `format_args!`, `write!`, and `writeln!` in `if let` scrutinees in Rust Edition 2024.](rust-lang/rust#145342) This applies [Rust Edition 2024's `if let` temporary scope rules](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) to these temporaries, which previously could live past the `if` expression regardless of Edition. - [Invalid numeric literal suffixes in tuple indexing, tuple struct indexing, and struct field name positions are now correctly rejected](rust-lang/rust#145463) - [Closures marked with the keyword `static` are now syntactically invalid](rust-lang/rust#145604) - [Shebangs inside `--cfg` and `--check-cfg` arguments are no longer allowed](rust-lang/rust#146211) - [Add future incompatibility lint for temporary lifetime shortening in Rust 1.92](rust-lang/rust#147056) Cargo compatibility notes: - `cargo publish` no longer keeps `.crate` tarballs as final build artifacts when `build.build-dir` is set. These tarballs were previously included due to an oversight and are now treated as intermediate artifacts. To get `.crate` tarballs as final artifacts, use `cargo package`. In a future version, this change will apply regardless of `build.build-dir`. [#&#8203;15910](rust-lang/cargo#15910) - Adjust Cargo messages to match rustc diagnostic style. This changes some of the terminal colors used by Cargo messages. [#&#8203;15928](rust-lang/cargo#15928) - Tools and projects relying on the [internal details of Cargo's `build-dir`](https://doc.rust-lang.org/cargo/reference/build-cache.html) may not work for users changing their `build-dir` layout. For those doing so, we'd recommend proactively testing these cases particularly as we are considering changing the default location of the `build-dir` in the future ([cargo#16147](rust-lang/cargo#16147)). If you can't migrate off of Cargo's internal details, we'd like to learn more about your use case as we prepare to change the layout of the `build-dir` ([cargo#15010](rust-lang/cargo#15010)). <a id="1.91.0-Internal-Changes"></a> ## Internal Changes These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools. - [Update to LLVM 21](rust-lang/rust#143684) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNjkuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE2OS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team

10 participants