rustrustdoc

Why does Vec::iter_mut not show up in the documentation index of std::vec::Vec?


In https://doc.rust-lang.org/std/vec/struct.Vec.html#method.iter,

I can only find iter in the index sidebar to the left of the page. However, iter_mut could not be found.

Could anyone explain if it's intentional, or a bug?

This is inconvenient because search through text is hard when browsing from phone. I was scrolling through the index and could not find iter_mut.

enter image description here


Solution

  • The sidebar only shows methods that use the Deref implementation, not those that use the DerefMut implementation. As such, the sidebar only shows non-mutable slice methods. This is a known bug. A fix has been merged and can be seen in the documentation for the beta release. I assume then that the fix will be in next stable release.