1.100-beta regression: `box` patterns have been removed (feature `box_patterns`)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/rust
-
needs-triage relnotes relnotes-needs-review relnotes-tracking-issue T-compiler T-libs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
rust-lang/rust#163875 · 1 comment ·
Maintainers usually reply within 1 day
-
relnotes-tracking-issue T-release
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rust-lang/rust#163811 · 5 comments ·
Maintainers usually reply within 1 day
-
C-bug needs-triage T-bootstrap T-rust-analyzer
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
rust-lang/rust#163751 · 6 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Regression 1.98 → 1.99: `thread_local!` destructors no longer run at thread exit on `wasm32-wasip1-threads`Possibly taken @maxdexh claimed this 2 days ago. OpenA-thread-locals C-bug O-wasi P-medium regression-from-stable-to-stable T-libs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
rust-lang/rust#163748 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
needs-triage relnotes relnotes-needs-review relnotes-tracking-issue T-compiler T-libs T-rustdoc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 90/100
fastrevmd-lab/rustmistmcp#161 ·
-
arch-audit refactor
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
SocketDev/socket-patch#1011 ·
Maintainers usually reply within 1 day
-
bug user-priority/P2
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
opencode: an unanswered --version probe launches opencode 2 without per-session service isolationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
security-advisory
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MinBZK/regelrecht#1686 ·
Maintainers usually reply within 1 day