Description
Background
I was just changing some code to use associated consts for a struct. I wasn't sure what the exact syntax was, so I was looking for the documentation about it. I remembered that it was recently stabilized, so I googled for "rust associated constants". Here's the top results:
The first result looked good, but because it had "1.7.0" in the URL and it was in a "Nightly Rust" section, I wasn't sure whether this feature had changed in the time that it was stabilized, so I continued my search.
The next result was the tracking issue. I tried to find a definitive statement there as to when it was actually stabilized, but couldn't find one. Also there were no links to the documentation.
So then I went looking for the Rust 1.20 announcement post, and it had some documentation. That helped. But I was still looking for something that is not a blog post, something better to link to.
So I went back to the tracking issue and found a link to an issue to add documentation to the reference. Finally, I dug up this: https://doc.rust-lang.org/stable/reference/items.html#associated-constants That's what I wanted to find in the beginning!
Possible improvements
I think there are a couple of things that could have helped me find this quicker:
- The first google result (the nightly rust feature page) could be updated to have a big notice with a link to the stable docs for that feature and a mentioning in which Rust version it was stabilized. (You could make an argument that old docs should not be changed, but I think it's better to be pragmatic if that's what the first search result is.)
- The blog post could link to the documentation.
- The tracking issue description could be updated to clearly state in which stable release that feature was included and link to the documentation.
All these things would make it more likely for people to find the right documentation and not have to wonder about when a feature was stabilized.
What do you think? I'm not sure if that's something that warrants an RFC or if there are any existing checklists in place for what to do when stabilizing a feature (which we could add the above things to).