Skip to content

std: make std::io::IoError{,Kind} implement Eq #15653

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

Merged
merged 1 commit into from
Jul 14, 2014
Merged

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jul 13, 2014

No description provided.

@erickt erickt changed the title std: make std::IoError{,Kind} implement Eq std: make std::io::IoError{,Kind} implement Eq Jul 13, 2014
@bors bors closed this Jul 14, 2014
@bors bors merged commit c5edc70 into rust-lang:master Jul 14, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Mar 10, 2024
…ange-pattern, r=Veykril

fix: goto-definition for constants inside range pattern

Fix rust-lang#15653.

This PR addresses the issue where it was not possible to navigate to constants in range patterns, specifically including two major changes:

1. Previously, both the `start` and `end` fields in `Pat::Range` were of type `LiteralOrConst`. When performing `goto-definition` on constants inside range patterns, r-a would use `resolve_bind_pat_to_const` to find their definitions. However, because the content of a `Const` is not `Pat` but `Path`, it was not stored in the `source_map`, so `resolve_bind_pat_to_const` would returns `None`. This PR changes them to `Const(PatId)`, so that during the lowering process, they are considered as a `pat`, allowing their definitions to be found later through `resolve_bind_pat_to_const`.

2. The process related to range patterns in MIR-lowering has been modified to correctly handle the above changes.
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