Skip to content

Missing dead_code warnings #48

@dtolnay

Description

@dtolnay
use anyhow::Error;
use fehler::throws;

#[throws]
fn f() {}

fn g() {}

fn main() {}
warning: function is never used: `g`
 --> src/main.rs:7:4
  |
7 | fn g() {}
  |    ^
  |
  = note: `#[warn(dead_code)]` on by default

It seems throws functions aren't seen by the compiler as dead code when they should be. Probably some Span is wrong somewhere.

(Tested as of master @ df2e3d4.)

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