Description
On iPhone Safari 15.1 (and possibly other mobile browsers, I am unable to check EDIT: Android browsers do not have this issue) in the source view code lines get line wrapped which causes the line numbers to desynchronize from their lines. In some cases multi-digit line numbers also get line wrapped which causes further desynchronization, though from my checking this currently happens for docs hosted on docs.rs but not on doc.rust-lang.org/std. This issue also means that clicking on source links in documentation leads to completely unrelated code as the links are to the line numbers and not the lines themselves.
This issue does not happen on Windows browsers I tested when I manually shrink the window to be approximately as narrow as the mobile browser. I have not tested the issue with computer version of Safari.
https://doc.rust-lang.org/src/std/lib.rs.html#1-633 viewed on iPhone Safari 15.1 (note how one code line covers multiple line numbers when it wraps):
https://doc.rust-lang.org/src/std/lib.rs.html#1-633 viewed on Windows Firefox 105.0.1 with similar window size (no issue here):
https://docs.rs/smallvec/latest/src/smallvec/lib.rs.html#1485 viewed on iPhone Safari 15.1 (no source code is visible because the multi-line line numbers scroll way beyond source code):
https://docs.rs/smallvec/latest/src/smallvec/lib.rs.html#1485 viewed on iPhone Safari 15.1 and manually scrolled to the correct line (note the incorrect line numbers that cover multiple actual code lines):
https://docs.rs/smallvec/latest/src/smallvec/lib.rs.html#1485 viewed on Windows Firefox 105.0.1 with similar window size (no issue here):