Change _rhs to _index.

Because var is provided as an index not a right hand side.
Remove unnecessary ::core::ops::

It shows error: failed to resolve. Maybe a missing `extern crate core`
anyway.
Change `from` and `to` to `_from` and `_to`

This to avoid warning: unused variable: `from`,
#[warn(unused_variable)] on by default.
auto merge of #18024 : phungleson/rust/fix-var-name-in-doc, r=brson

Make the doc more consistent & runnable.

* Use `_index` instead of `_rhs` when appropriate.
* Use `_from` and `_to` to avoid warning.
* Remove unnecessary `::core::ops`