- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.ICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsHelping to "clean up" bugs with minimal examples and bisections
Description
CI on https://github.com/async-rs/async-std suddenly started failing as we run with deny warnings.
the error is
error: variable does not need to be mutable
##[error]  --> src/io/stderr.rs:92:9
   |
92 |         mut self: Pin<&mut Self>,
   |         ----^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `-D unused-mut` implied by `-D warnings`
error: variable does not need to be mutable
for the following code
impl Write for Stderr {
    fn poll_write(
        mut self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &[u8],
    ) -> Poll<io::Result<usize>> {
        let state = &mut *self.0.lock().unwrap();
    // ... 
}which stops compiling if the referenced mut is removed.
(Sorry in advance if this is known, but I couldn't find a matching issue)
CI run: https://github.com/async-rs/async-std/pull/822/checks?check_run_id=793134400
Source Code: https://github.com/async-rs/async-std/blob/master/src/io/stderr.rs#L90-L96
Edit: It seems that the nightly version might not be what triggered it, but rather a change in the underlying implementation of the lock that is being called above.
No warnings under
This issue has been assigned to @nbdd0121 via this comment.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.ICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsHelping to "clean up" bugs with minimal examples and bisections