You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actually, it looks like we are doing the right thing here? we are locking in the base of that fn. this is invalid, right?
maybe clippy is getting confused by all the shadowing of inner?
Whoa, that's a thoroughly unhelpful error message.. :/
I don't think we have an issue here, since the temporaries involved here are:
inner.as_mut(): just a "dumb" projection of inner, misuse is protected against since it grabs a mut borrow on inner for its lifetime
poll_next(): stateful and complex, but the return value is "just" the ADT Poll<Option<S::Item>>
Poll and Option are both just dumb data and I don't see any has_significant_drop attribute on Pin, so I can only assume that it assumes the worst for S::Item?
nightkr
added a commit
to nightkr/kube-rs
that referenced
this issue
Jun 8, 2022
#931)
Silence false positive significant_drop_in_scrutinee for SplitCase
Fixes#930
This should ensure that we get a compile error if any temporary is even borrowed
past the `poll_next()` call.
interesting new clippy lint seems to suggest that
impl Stream for SplitCase
can deadlock (rust issue: rust-lang/rust#93883 ).this is used in applier.
haven't had time to look at it fully, but it looks similar to our setup, and it blocks ci atm.
clippied code shows
this.inner
being lockedhttps://github.com/kube-rs/kube-rs/blob/98cf1c89c37bb8bfc12b0d31d0b3264b13076771/kube-runtime/src/utils/mod.rs#L78-L97
The text was updated successfully, but these errors were encountered: