Skip to content

Use span snippet in all suggestions where possible #3023

Closed
@estebank

Description

@estebank

Suggestions should first attempt to use a span snippet instead of generated code (presumably a Ty) to avoid suggesting incorrect code:

warning: use of `unwrap_or` followed by a function call
   --> policy.rs:481:46
    |
481 |         .iter().map(|a| a.into()).collect()).unwrap_or(vec![]),
    |                                              ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| < [ _ ] > :: into_vec ( box [ $ ( $ x ) , * ] ))`
    |
    = note: #[warn(or_fun_call)] on by default
    = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#or_fun_call

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