Skip to content

FN unneccessary_literal_unwrap: unwrap_unchecked() #11093

@matthiaskrgr

Description

@matthiaskrgr

Summary

Guess we could warn here as well? :)

Reproducer

I tried this code:

fn main() {
    let val1 = unsafe { Some(1).unwrap_unchecked() };
}

Version

No response

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions