Move dead_code related tests to test/ui/dead-code
This helps organize the tests better. I also renamed several of the tests to remove redundant dead-code in the path, and better match what they're testing
This commit is contained in:
parent
269d38413c
commit
e063ddb12e
36 changed files with 18 additions and 18 deletions
15
src/test/ui/lint/dead-code/basic.rs
Normal file
15
src/test/ui/lint/dead-code/basic.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#![deny(dead_code)]
|
||||
#![allow(unreachable_code)]
|
||||
|
||||
fn foo() { //~ ERROR function is never used
|
||||
|
||||
// none of these should have any dead_code exposed to the user
|
||||
panic!();
|
||||
|
||||
panic!("foo");
|
||||
|
||||
panic!("bar {}", "baz")
|
||||
}
|
||||
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue