Skip to content

Conversation

@hanbings-agent
Copy link
Owner

This PR introduces the ignored keyword as an explicit placeholder for ignored bindings in pattern destructuring, behind the #[feature(explicit_ignored_bindings)] gate.

The motivation is to improve semantic clarity and explicitly express the intent of ignoring a binding, similar to how async fn, impl Trait, and dyn Trait enhance readability by making intent more explicit.

For example, let (a, ignored) = (1, 2); now explicitly states that the second element is intentionally ignored, behaving identically to let (a, _) = (1, 2);.

The ignored keyword is implemented as a weak keyword and parses into PatKind::Wild.


Open in Cursor Open in Web

Co-authored-by: agent <agent@hanbings.io>
@cursor
Copy link

cursor bot commented Dec 25, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants