let v = &mut *self.0; v[v.len() - 1] = 10; にすると通るので、間にDerefMutが挟まっているのが悪さしている気がする(だから何だという話ではあるが…)
-
-
rustcのテストに当該ケースに近い例あり(ここでIはIndex/IndexMutを実装するユーザ定義型でありスライスではない) https://github.com/rust-lang/rust/blob/f6fe99c798cb65280a9a56f442b371adcb7b8aa2/src/test/ui/borrowck/two-phase-nonrecv-autoref.rs#L138 …
#memoShow this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.