Skip to content

Invalid machine-applicable suggestion for unused variables in pattern matching when the ref specifier is present #59918

Closed
@SiebenCorgie

Description

@SiebenCorgie

Hi,

I found out about Cargo's cargo fix command recently and tried it on one of my crates. Apparently either rustc or cargo ran into some kind of bug which it asked me to report.

First things first, I'm on (Arch) Linux 5.0 if that matters, my rustup show output is the following:

Default host: x86_64-unknown-linux-gnu

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.35.0-nightly (3de010678 2019-04-11)

rustc --version --verbose

rustc 1.35.0-nightly (3de010678 2019-04-11)
binary: rustc
commit-hash: 3de0106789468b211bcc3a25c09c0cf07119186d
commit-date: 2019-04-11
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0

The error it reported

after fixes were automatically applied the compiler reported errors within these files:

  * widkan/src/rendering/mod.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see 
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the `--broken-code` flag

The following errors were reported:
error: expected `,`
   --> widkan/src/rendering/mod.rs:509:41
    |
509 |                     Primitive::Text{ref content: _, ref size: _} => texts.push(p),
    |                                         ^^^^^^^

error: aborting due to previous error

Original diagnostics will follow.

The rest of that command is a list of usual "unused imports/variable". If you need those just let me know.
The crate can be found here if you want to have a look at the specific line the error was reported on.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions