How to get specific commit/version url of rust code when reference from official doc

To get a picture, think about the case of referencing lines of code on github. View a source file on github, then place y then it will change url into the tip of the tree commit (if we view it through the master/main branch). So when we share such url to others, specific lines won't be changed as might be affected from newer update of the Rust code.

So for example, if I view macros.rs - source at such specific line, do I have any option to make sure it reference to latest version in that time period of Rust so when others view it, specific lines won't change?

To do that you use the versioned documentation instead of the latest: https://doc.rust-lang.org/1.59.0/src/alloc/macros.rs.html#111

Thanks!

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.