Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

True. I should have explained that better. If you're accessing an array, you'll have to do the pointer offset-ing yourself (otherwise you're using a slice and all the checking that entails). Thus, you can't use a reference type, because reference types don't have `<*const T>::add` like pointers do (also, `&T as usize` is invalid; you have to go through a pointer type first). I suppose I assumed you'd be accessing an array/slice; references otherwise are fine.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: