Skip to content

add a lint for useless transmutes #11400

Closed
@emberian

Description

@emberian
fn main() {
    unsafe { std::cast::transmute::<int, int> ( 52 ) };
}

Should have a warning. In general, transmute::<T, T> should be warned against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions