rust/src/test/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
365 B
Rust
Raw Normal View History

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