2016-10-27 01:07:38 -05:00
|
|
|
//! A test to ensure that helpful `note` messages aren't emitted more often
|
|
|
|
//! than necessary.
|
|
|
|
|
2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2017-07-26 23:51:09 -05:00
|
|
|
|
|
|
|
// Although there are three warnings, we should only get two "lint level defined
|
2016-10-27 01:07:38 -05:00
|
|
|
// here" notes pointing at the `warnings` span, one for each error type.
|
2017-07-26 23:51:09 -05:00
|
|
|
#![warn(unused)]
|
2016-10-27 01:07:38 -05:00
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
|
|
|
|
fn main() {
|
2017-11-20 06:13:27 -06:00
|
|
|
let theTwo = 2; //~ WARN should have a snake case name
|
|
|
|
let theOtherTwo = 2; //~ WARN should have a snake case name
|
|
|
|
//~^ WARN unused variable
|
2016-10-27 01:07:38 -05:00
|
|
|
println!("{}", theTwo);
|
|
|
|
}
|