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

non-reference pattern used to match a reference (see issue #42640) #115

Closed
zigguratvertigo opened this issue Jun 6, 2018 · 7 comments
Closed

Comments

@zigguratvertigo
Copy link

Hi!

On grabbing 0.2.9 from crates.io last night, I hit the following error several times as it tries to compile structopt-derive:

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> C:...\structopt-derive-0.2.9\src\attrs.rs:112:17
|
112 | / NameValue(MetaNameValue {
113 | | ident,
114 | | lit: Str(value),
115 | | ..
116 | | }) => self.push_str_method(&ident.to_string(), &value.value()),
| |__________________^
help: consider using a reference

Known issue?

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 6, 2018

Looks like a direct deps of rust 1.26

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 6, 2018

what's your rust version? Is updating to latest stable fix this problem?

@hcpl
Copy link
Contributor

hcpl commented Jun 6, 2018

@zigguratvertigo the code you pointed to uses default binding modes, implemented a while ago and stabilized in Rust 1.26.

On the related note, I'd like to know what is the policy around minimum supported Rust version for structopt. clap has the policy written down in this issue: clap-rs/clap#740 and it is enforced using Travis CI. @TeXitoi thoughts?

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 6, 2018

No policy for the moment, but it can be added. I think at minimum, we should add a specific version in .travis.yml to catch the needed rust upgrades.

@TeXitoi
Copy link
Owner

TeXitoi commented Jun 6, 2018

Maybe "must compile if latest clap compiles" a good policy?

@hcpl
Copy link
Contributor

hcpl commented Jun 6, 2018

This sounds reasonable to me. The latest clap tracks 1.21 which should cover enough users targeting CLI apps.

I also suggest placing a short note about required Rust version in README and/or other easily visible places.

@zigguratvertigo
Copy link
Author

@TeXitoi updating to latest 1.56.2 fixed the compilation issue - thanks.
Having a check around the minimum supported rust version would be great.

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

No branches or pull requests

3 participants