Skip to content

clippy::unimplemented doesn't detect unimplemented!() with message #3528

Closed
@ExoticMatter

Description

@ExoticMatter

When a message is given to unimplemented!() (rust-lang/rust@f517719), the unimplemented lint doesn't detect it.

#[allow(unreachable_code)]
#[warn(clippy::unimplemented)]
fn main() {
    unimplemented!("a()"); // case 1, not detected
    unimplemented!();      // case 2
}
warning: `unimplemented` should not be present in production code
 --> src/main.rs:5:5
  |
5 |     unimplemented!();      // case 2
  |     ^^^^^^^^^^^^^^^^^
  |
note: lint level defined here
 --> src/main.rs:2:8
  |
2 | #[warn(clippy::unimplemented)]
  |        ^^^^^^^^^^^^^^^^^^^^^
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unimplemented

clippy: 29bf75c (2018-12-05)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions