-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
Consider this import:
use std::io::{BufRead, BufReader, Read};
When BufRead is not used in the code, but BufReader and Read are used, one would expect this error:
warning: unused import: `BufRead`
--> src/main.rs:3:15
|
3 | use std::io::{BufRead, BufReader, Read};
| ^^^^^^^
|
= note: #[warn(unused_imports)] on by default
Which is what happens on stable. On nighly, however, that does not happen, sometimes we got this error instead:
warning: unused import: `std::io::{BufRead, BufReader, Read}`
--> src/main.rs:3:5
|
3 | use std::io::{BufRead, BufReader, Read};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
But sometimes it shows the correct error, and sometimes it shows both errors.
Playground link with minimal example
If you comment out the first function it shows both errors, and if you comment out the second function it shows the stable error.
shssoichiro
Metadata
Metadata
Assignees
Labels
regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.