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
{{ message }}
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.
fnfork_join(mutA:Mat<f64>){letmut guards = vec![];for stripe inA.hstripes_mut(100){for block in stripe.vstripes_mut(100){//~^ error: `stripe` does not live long enough
guards.push(thread::scoped(|| { block;}));}}}
The problem is the signature of iter_mut, it borrows the sub-matrix rather than re-borrowing the original data. Two ways to fix this:
Add user-defined unsized types to get proper re-borrow semantics.
Change the signature of iter_mut (and several other similar functions) to take the caller by value.
The text was updated successfully, but these errors were encountered:
The problem is the signature of
iter_mut
, it borrows the sub-matrix rather than re-borrowing the original data. Two ways to fix this:iter_mut
(and several other similar functions) to take the caller by value.The text was updated successfully, but these errors were encountered: