Linking to specific version of of online rust docs

Hi there. I am writing a tutorial. I want to link to a specific line in the Rust std documentation, but I'd like the link to be evergreen: In other words, if the std library code changes years in the future — however unlikely that may be — I don't want the link to go to the wrong line.

Is there a way to link to a specific version of the documentation source? As of now, I can right-click on the line number and generate a link URL to copy, like:

https:doc.rust-lang.org/stable/src/core/num/mod.rs.html#1083

...but, I'd like to generate a URL like:

https://doc.rust-lang.org/VERSION/src/core/num/mod.rs.html#1083

Thank you.

I don't know of a way to get a “permalink” from only navigating the docs, but if you edit in the version number it will have the effect you want, like:

https://doc.rust-lang.org/1.66.0/src/core/num/mod.rs.html#1083

Thank you, this is it!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.