deref corecionとか無関係っぽい
-
-
(2) 3行目において、一時変数を省略せずに記述すると次のようなコードと等価になっている(多分) let tmp0 = &mut x.0; let tmp1 = &x.0; let tmp2 = Vec::len(tmp1); let tmp3 = tmp1 - 1; *std::ops::IndexMut(tmp0, tmp3) = 0;
Show this thread -
(3) tmp0を作る際にxの可変借用を消費する必要があり、この時点で以後xへのいかなる借用が禁止される。したがって、tmp1を作ろうとした時点でxの借用ができない。 ...と思ったがこれはおそらく誤り(そうでないと x.0[x.1.len() - 1] = 0 が有効である理由が説明できない)
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.