rust/tests/ui/span/unused-warning-point-at-identifier.rs

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

31 lines
409 B
Rust
Raw Normal View History

2017-09-25 19:01:55 +00:00
// run-pass
#![warn(unused)]
enum Enum { //~ WARN enum `Enum` is never used
2017-09-25 19:01:55 +00:00
A,
B,
C,
D,
}
struct Struct { //~ WARN struct `Struct` is never constructed
2017-09-25 19:01:55 +00:00
a: usize,
b: usize,
c: usize,
d: usize,
}
fn func() -> usize { //~ WARN function `func` is never used
2017-09-25 19:01:55 +00:00
3
}
fn
func_complete_span() //~ WARN function `func_complete_span` is never used
2017-09-25 19:01:55 +00:00
-> usize
{
3
}
fn main() {}