Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

1.100-beta regression: `box` patterns have been removed (feature `box_patterns`)

Open Beginner friendly
#163,830 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
compilers

Research direction

The regression is reported at src/element/simplify.rs:63, in a box pattern matching a negated operand. Read that match arm and check the compiler guidance in the issue; then run the project’s tests or crater reproduction to verify the pattern compiles on beta and the simplification still works. The payload does not name a specific test file.

Written by the indexing model from the issue text.

Description

I-prioritize needs-triage regression-from-stable-to-beta T-lang

Found in crater run: https://crater-reports.s3.amazonaws.com/beta-1.100/1.99.0-beta.8/gh/vic1707.xprs/log.txt

Code:

/* match arm in match block */
            #[cfg(NIGHTLY)]
            // (-a) + a => 0
            BinOp {
                op: Plus,
                lhs: Element::UnOp(box UnOp { op: Minus, operand }),
                rhs,
            } if operand == rhs => Number(0.0),

Warning on stable:

[INFO] [stderr] warning: box pattern syntax is experimental
[INFO] [stderr]   --> src/element/simplify.rs:63:36
[INFO] [stderr]    |
[INFO] [stderr] 63 |                 lhs: Element::UnOp(box UnOp { op: Minus, operand }),
[INFO] [stderr]    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]    |
[INFO] [stderr]    = note: see issue #29641 <https://github.com/rust-lang/rust/issues/29641> for more information
[INFO] [stderr]    = warning: unstable syntax can change at any point in the future, causing a hard error!
[INFO] [stderr]    = note: for more information, see issue #154045 <https://github.com/rust-lang/rust/issues/154045>

Error on beta:

[INFO] [stdout] error: `box` patterns have been removed (feature `box_patterns`)
[INFO] [stdout]   --> src/element/simplify.rs:63:36
[INFO] [stdout]    |
[INFO] [stdout] 63 |                 lhs: Element::UnOp(box UnOp { op: Minus, operand }),
[INFO] [stdout]    |                                    ^^^
[INFO] [stdout]    |
[INFO] [stdout]    = help: enable feature `deref_patterns` instead and...
[INFO] [stdout] help: ...if possible just remove keyword `box`...
[INFO] [stdout]    |
[INFO] [stdout] 63 -                 lhs: Element::UnOp(box UnOp { op: Minus, operand }),
[INFO] [stdout] 63 +                 lhs: Element::UnOp(UnOp { op: Minus, operand }),
[INFO] [stdout]    |
[INFO] [stdout] help: ...otherwise replace it with an invocation of macro `deref`
[INFO] [stdout]    |
[INFO] [stdout] 63 -                 lhs: Element::UnOp(box UnOp { op: Minus, operand }),
[INFO] [stdout] 63 +                 lhs: Element::UnOp(deref!(UnOp { op: Minus, operand })),
[INFO] [stdout]    |
Dominant language
Rust
Stars
119k
Forks
17.3k
Avg merge
2d 8h
Merged PRs (30d)
544

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/rust

All issues in rust-lang/rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.