Skip to content

Conversation

@Zalathar
Copy link
Member

The older string_deref_patterns feature has been superseded by the newer and more general deref_patterns feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for string_deref_patterns have been migrated to use deref_patterns instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that deref_patterns is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But string_deref_patterns doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.


@Zalathar Zalathar added the F-deref_patterns `#![feature(deref_patterns)]` label Dec 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2025

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in match lowering

cc @Nadrieril

@rustbot rustbot added 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 Dec 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zalathar Zalathar force-pushed the string-deref-patterns branch from 3a55a84 to 4ac5492 Compare December 31, 2025 02:07
@Zalathar Zalathar force-pushed the string-deref-patterns branch from 4ac5492 to 694b707 Compare December 31, 2025 02:33
@Zalathar Zalathar force-pushed the string-deref-patterns branch from 694b707 to ef8d943 Compare December 31, 2025 03:21
@jackh726
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 31, 2025

📌 Commit ef8d943 has been approved by jackh726

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 Dec 31, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 31, 2025
…jackh726

Remove `feature(string_deref_patterns)`

The older `string_deref_patterns` feature has been superseded by the newer and more general `deref_patterns` feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for `string_deref_patterns` have been migrated to use `deref_patterns` instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that `deref_patterns` is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But `string_deref_patterns` doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.

---
- Tracking issue for both features: rust-lang#87121
- Original implementation: rust-lang#98914
- [Zulip thread: Can we remove `#![feature(string_deref_patterns)]`?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Can.20we.20remove.20.60.23!.5Bfeature.28string_deref_patterns.29.5D.60.3F/with/565787352)
bors added a commit that referenced this pull request Dec 31, 2025
Rollup of 4 pull requests

Successful merges:

 - #143741 (`oneshot` Channel)
 - #146798 (RISC-V: Implement (Zkne or Zknd) intrinsics correctly)
 - #150337 (docs: fix typo in std::io::buffered)
 - #150530 (Remove `feature(string_deref_patterns)`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Dec 31, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #146798 (RISC-V: Implement (Zkne or Zknd) intrinsics correctly)
 - #150337 (docs: fix typo in std::io::buffered)
 - #150530 (Remove `feature(string_deref_patterns)`)
 - #150543 (`rust-analyzer` subtree update)
 - #150544 (Use --print target-libdir in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 15c467b into rust-lang:main Dec 31, 2025
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 31, 2025
rust-timer added a commit that referenced this pull request Dec 31, 2025
Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726

Remove `feature(string_deref_patterns)`

The older `string_deref_patterns` feature has been superseded by the newer and more general `deref_patterns` feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for `string_deref_patterns` have been migrated to use `deref_patterns` instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that `deref_patterns` is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But `string_deref_patterns` doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.

---
- Tracking issue for both features: #87121
- Original implementation: #98914
- [Zulip thread: Can we remove `#![feature(string_deref_patterns)]`?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Can.20we.20remove.20.60.23!.5Bfeature.28string_deref_patterns.29.5D.60.3F/with/565787352)
@Zalathar Zalathar deleted the string-deref-patterns branch December 31, 2025 22:39
github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Jan 1, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146798 (RISC-V: Implement (Zkne or Zknd) intrinsics correctly)
 - rust-lang/rust#150337 (docs: fix typo in std::io::buffered)
 - rust-lang/rust#150530 (Remove `feature(string_deref_patterns)`)
 - rust-lang/rust#150543 (`rust-analyzer` subtree update)
 - rust-lang/rust#150544 (Use --print target-libdir in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
Comment on lines -383 to -388
## `tests/ui/deref-patterns/`: `#![feature(deref_patterns)]` and `#![feature(string_deref_patterns)]`

Tests for `#![feature(deref_patterns)]` and `#![feature(string_deref_patterns)]`. See [Deref patterns | The Unstable book](https://doc.rust-lang.org/nightly/unstable-book/language-features/deref-patterns.html).

**FIXME**: May have some overlap with `tests/ui/pattern/deref-patterns`.

Copy link
Member

Choose a reason for hiding this comment

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

It might have been nice to rename this section to describe tests/ui/pattern/deref-patterns instead

github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Jan 8, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146798 (RISC-V: Implement (Zkne or Zknd) intrinsics correctly)
 - rust-lang/rust#150337 (docs: fix typo in std::io::buffered)
 - rust-lang/rust#150530 (Remove `feature(string_deref_patterns)`)
 - rust-lang/rust#150543 (`rust-analyzer` subtree update)
 - rust-lang/rust#150544 (Use --print target-libdir in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-deref_patterns `#![feature(deref_patterns)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants