error[E0502]: cannot borrow `mat` as mutable because it is also borrowed as immutable
--> tests/compile-fail/multi/mat_rows.rs:14:13
|
12 | let iter = mat.rows();
| --- immutable borrow occurs here
13 | // This should fail: we cannot mutably borrow `mat` while `iter` exists
14 | let _ = mat.as_view_mut();
| ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
15 | for row in iter {
| ---- immutable borrow later used here