Skip to content

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

Closed

Description

@zigguratvertigo

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?

Activity

  1. TeXitoi commented on Jun 6, 2018

    @TeXitoi
    Owner

    Looks like a direct deps of rust 1.26

  2. TeXitoi commented on Jun 6, 2018

    @TeXitoi
    Owner

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

  3. hcpl commented on Jun 6, 2018

    @hcpl
    Contributor

    @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?

  4. TeXitoi commented on Jun 6, 2018

    @TeXitoi
    Owner

    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.

  5. TeXitoi commented on Jun 6, 2018

    @TeXitoi
    Owner

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

  6. hcpl commented on Jun 6, 2018

    @hcpl
    Contributor

    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.

  7. zigguratvertigo commented on Jun 6, 2018

    @zigguratvertigo
    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.

  8. added a commit that references this issue on Jun 7, 2018
    18192d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions