Skip to content
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

context: fix non-reference pattern used to match a reference #236

Closed
wants to merge 1 commit into from

Conversation

tmatth
Copy link
Member

@tmatth tmatth commented Jun 12, 2018

Fixes:

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
    --> src/context.rs:1590:13
     |
1590 |         for (name, start, end) in &self.map {
     |             ^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&(name, start, end)`

@tmatth
Copy link
Member Author

tmatth commented Jun 12, 2018

Note: this was with cargo 0.26.0-nightly (1d6dfea44 2018-01-26)

@tmatth tmatth requested a review from tdaede June 12, 2018 19:11
@tmatth
Copy link
Member Author

tmatth commented Jun 12, 2018

Refs rust-lang/rust#42640

@rzumer
Copy link
Collaborator

rzumer commented Jun 12, 2018

Is this necessary? Latest stable rustc seemed to work.

@tmatth
Copy link
Member Author

tmatth commented Jun 12, 2018

@rzumer failed on the above version of nightly, but seems non-fatal for e.g. rustc 1.28.0-nightly (1d4dbf488 2018-06-11) + cargo 1.28.0-nightly (e2348c2db 2018-06-07)

@rzumer
Copy link
Collaborator

rzumer commented Jun 12, 2018

Yes, but this is an unsupported version, stable 0.26 should compile. I am not against fixing compilation on older versions of rustc if readability does not suffer, however.

@tmatth
Copy link
Member Author

tmatth commented Jun 12, 2018

@rzumer yeah I don't have strong opinions about it either.

@tmatth
Copy link
Member Author

tmatth commented Jun 12, 2018

Closing as we can assume that it's unlikely for people to hit this unless they are on old nightly.

@tmatth tmatth closed this Jun 12, 2018
@tmatth tmatth deleted the bugfix/reference branch February 5, 2021 15:38
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.

2 participants