Skip to content

Unreachable expression warnings with panics #67

@tvallotton

Description

@tvallotton

The todo!() macro produces an unreachable expression warning:

#[throws(Error)]
fn foo() {
    todo!()
}
warning: unreachable expression
 --> rocket_lang/src/main.rs:4:1
  |
4 | #[throws(Error)]
  | ^^^^^^^^^^^^^^^^ unreachable expression
5 | fn foo() {
6 |     todo!()
  |     ------- any code following this expression is unreachable
  |
  = note: `#[warn(unreachable_code)]` on by default
  = note: this warning originates in the attribute macro `throws` (in Nightly builds, run with -Z macro-backtrace for more info)

It'd be nice if this were be fixed if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions