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!
I think there are a couple of things that could have helped me find this quicker:
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).
There's a lot here; let's talk about it at a future doc meeting. Some of this is covered by in-progress plans, some not.
We talked about this in the docs team meeting today, and a lot of discussion came out of it. Primarily, i see a couple major things going on here:
/stable/ or the like) is the only source of API docs that it needs to care about. This is a problem because Rust has moved a lot since then. In fact, it's exacerbated it some, because it may have indexed that page at the domain root back when it was unstable, but once it got removed in favor of a heading on a different page, the 1.7.0 docs stuck because it had its own page for it! (I just ran the search myself, and i got the 1.10.0 docs instead. Hardly an improvement.)They're fairly related, but the latter is effectively a specific instance of the former. The suggestions that were raised for this are fairly far-reaching, and specifically need to pull in more people than "just the docs team" to properly deal with it. To wit:
/stable/ and /nightly/, or something like that. The idea here is to "fix" the search results to actually point to something that's more likely to be up to date.These are Big Projects, and especially with the impl period going on it's unlikely they'll be addressed until the new year, barring a small start on the "stabilized feature flag listing" without pulling it into any outside process. Still, the problem is real and this is what we came up with in the meeting.
Currently tagging this as low because it relies on so much other work; once we do that work, we can upgrade this.
One last thing to add to what @QuietMisdreavus said; once we implement https://github.com/rust-lang/rfcs/blob/master/text/1826-change-doc-default-urls.md this work will be easier to do
Triage: no changes here
This is still a widespread problem. I believe it can be quickly solved by adding
Disallow: /1.
rule to the robots.txt. Stable/beta/nightly docs have their own path prefixes, so this would eliminate all "archived" version-specific docs, and wouldn't require regular updates to robots.txt.
The robots.txt file isn't part of this repo, so I can't make a PR for it.
Here's a merge of the current live robots.txt and the proposed change:
User-agent: *
Disallow: /0.3/
Disallow: /0.4/
Disallow: /0.5/
Disallow: /0.6/
Disallow: /0.7/
Disallow: /0.8/
Disallow: /0.9/
Disallow: /0.10/
Disallow: /0.11.0/
Disallow: /0.12.0/
# this hides all _archived_ docs for 1.x, but doesn't hide any of the latest stable/beta/nighly, which have a different path prefix
Disallow: /1.
# these links aren't the book, but old stubs/redirects that push the real book out of search results
Disallow: /book/first-edition/
Disallow: /book/second-edition/
Disallow: /stable/book/first-edition/
Disallow: /stable/book/second-edition/
Disallow: /beta/book/first-edition/
Disallow: /beta/book/second-edition/
Disallow: /nightly/book/first-edition/
Disallow: /nightly/book/second-edition/
Another thing that would probably be a good idea is for the archived docs (regardless of whether they're the first Google result) to have a header in the style of the Django docs that warns people that they're not looking at the latest docs and provides a link to them.
...not just as one of the options to consider, but something that's done regardless of whether other measures are taken as a defense-in-depth measure in case someone winds up there.
Most helpful comment
Another thing that would probably be a good idea is for the archived docs (regardless of whether they're the first Google result) to have a header in the style of the Django docs that warns people that they're not looking at the latest docs and provides a link to them.
...not just as one of the options to consider, but something that's done regardless of whether other measures are taken as a defense-in-depth measure in case someone winds up there.