Skip to content

Unreachable code warning is not emitted if panic is called as a funcion #3802

@malbarbo

Description

@malbarbo

For this code

fn f(a) { a }

pub fn main() {
  f(panic())
}

the compiler emits the warning "Panic used as a function" but not "Unreachable code" for f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions