Skip to content

Tracking issue for release notes of #136490: Do not allow attributes on struct field rest patterns #137089

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

Open
3 tasks
rustbot opened this issue Feb 15, 2025 · 1 comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-parser Area: The lexing & parsing of Rust source code to an AST relnotes Marks issues that should be documented in the release notes of the next release. relnotes-tracking-issue Marks issues tracking what text to put in release notes. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Milestone

Comments

@rustbot
Copy link
Collaborator

rustbot commented Feb 15, 2025

This issue tracks the release notes text for #136490.

Steps

  • Proposed text is drafted by PR author (or team) making the noteworthy change.
  • Issue is nominated for release team review of clarity for wider audience.
  • Release team includes text in release notes/blog posts.

Release notes text

The responsible team for the underlying change should edit this section to replace the automatically generated link with a succinct description of what changed, drawing upon text proposed by the author (either in discussion or through direct editing).

# Compatibility Notes
- [Forbid attributes on `..` inside of struct patterns (`let Struct { #[attribute] .. }) =`](https://github.com/rust-lang/rust/pull/136490)

Tip

Use the previous releases categories to help choose which one(s) to use.
The category will be de-duplicated with all the other ones by the release team.

More than one section can be included if needed.

Release blog section

If the change is notable enough for inclusion in the blog post, the responsible team should add content to this section.
Otherwise leave it empty.

cc @Skepfyr, @compiler-errors -- origin issue/PR authors and assignees for starting to draft text

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-parser Area: The lexing & parsing of Rust source code to an AST relnotes Marks issues that should be documented in the release notes of the next release. relnotes-tracking-issue Marks issues tracking what text to put in release notes. T-lang Relevant to the language team, which will review and decide on the PR/issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 15, 2025
@rustbot rustbot modified the milestones: 1.86.0, 1.87.0 Feb 16, 2025
@Skepfyr
Copy link
Contributor

Skepfyr commented Mar 2, 2025

This does cause the compiler to reject code it previously accepted, however given crater found nothing and rustfmt deletes the offending code it's highly unlikely anyone will be affected by it, so I don't think much fuss needs to be made. I'd probably word the release not something like:

Reject attributes on .. inside struct patterns

It might be worth adding a few extra words to highlight that it was previously accepted? A code example would be nice but getting into pattern position is a lot of characters Struct { #[attr] .. } isn't the clearest and match foo { Struct { #[attr] ..} => () } } is long and might be misleading?

@BoxyUwU BoxyUwU removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-parser Area: The lexing & parsing of Rust source code to an AST relnotes Marks issues that should be documented in the release notes of the next release. relnotes-tracking-issue Marks issues tracking what text to put in release notes. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants