Closed
Description
The unused_results
lint appears to be somewhat overzealous on the current nightly compiler. I managed to reduce the issue down to a simple hello world-program, so something is definitely broken.
I tried this code:
#![deny(unused_results)]
fn main() {
println!("hello world!");
}
I expected to see the code compile successfully without any warnings.
Instead, the following error message showed up.
error: unused result
--> src/main.rs:4:5
|
4 | println!("hello world!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> src/main.rs:1:9
|
1 | #![deny(unused_results)]
| ^^^^^^^^^^^^^^
= note: this error originates in a macro outside of the current crate
Meta
$ rustc --version
rustc 1.21.0-nightly (13d94d5fa 2017-08-10)