rust/tests/ui/lint/dead-code/basic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
247 B
Rust
Raw Normal View History

#![deny(dead_code)]
#![allow(unreachable_code)]
fn foo() { //~ ERROR function `foo` is never used
// none of these should have any dead_code exposed to the user
panic!();
panic!("foo");
panic!("bar {}", "baz")
}
fn main() {}