Skip to content

identity_conversion triggered when coming from ? desugaring #3944

Closed
@estebank

Description

@estebank

I got the following error:

clippy 0.0.212 (37f5c1ec 2019-04-09)

error: identical conversion
   --> src/json_read.rs:316:24
    |
316 |             for raw in map.next_value::<Vec<&RawValue>>()? {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `map.next_value::<Vec<&RawValue>>()?()`: `map.next_value::<Vec<&RawValue>>()?`
    |
note: lint level defined here
   --> src/lib.rs:2:44
    |
2   | #![cfg_attr(feature = "cargo-clippy", deny(warnings))]
    |                                            ^^^^^^^^
    = note: #[deny(clippy::identity_conversion)] implied by #[deny(warnings)]
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

It seems to me that the .into() that's being complained about is coming from the ? operator. The lint should verify that the span isn't coming from this desugaring before triggering.

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