Skip to content

Unecessary Warning message #85913

Closed
@andrewasd

Description

@andrewasd

I tried this code:

#![allow(dead_code)]

fn fun() -> i32 {
    function() && return 1;

    panic!("stop");
}

fn function() -> bool {
    true
}

fn main() {}

where function is any function that returns a boolean , and it gives the warning
unused logical operator , but actually works as expected, so i think this warning should not come up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions