Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a proper 404 page for rust-lang.org and static.rust-lang.org #11896

Closed
huonw opened this issue Jan 29, 2014 · 7 comments
Closed

Have a proper 404 page for rust-lang.org and static.rust-lang.org #11896

huonw opened this issue Jan 29, 2014 · 7 comments
Labels
P-medium Medium priority
Milestone

Comments

@huonw
Copy link
Member

huonw commented Jan 29, 2014

We've been rather free with breaking old links and people are greeted with a generic github page or a raw XML page, which is very off-putting. (The XML page especially so, since static.rust-lang.org is where we put the docs.)

A nice page with a search bar and helpful links would be awesome.

@chris-morgan
Copy link
Member

For static.rust-lang.org, it should detect whether it is inside /doc/REVISION/CRATE/ and if it is, do these sorts of things:

  • Dynamically load /doc/REVISION/CRATE/{jquery.js, search-index.js, main.js} and be prepared to conduct a search for the appropriate member.
  • For a subpath of foo/bar/ or foo/bar/index.html, say "it looks like you're looking for foo::bar, which doesn't exist." and show search results for bar below.
  • For a subpath of foo/bar.html, if foo::bar is a module, redirect automatically to foo/bar/index.html.
  • For a subpath of foo/struct.Bar.html (and the other such types), say "it looks like you're looking for foo::Bar, which doesn't exist." (highlighting the path components appropriately as module and struct) and show search results for Bar below.

These are all entirely feasible with the one static document, using document.location.pathname.

@huonw
Copy link
Member Author

huonw commented Jan 29, 2014

Of course, that can be done incrementally. Even a really boring HTML page with a few static links would be orders of magnitude better than what we have now.

@adrientetar
Copy link
Contributor

We could also redirect static.rust-lang.org to the main page or the doc index.

@huonw
Copy link
Member Author

huonw commented Mar 19, 2014

(We now have cross-crate search, fwiw.)

@pnkfelix
Copy link
Member

nominating. I think we need to do this properly before releasing 1.0.

@pnkfelix
Copy link
Member

Assigning P-high, 1.0.

@pnkfelix pnkfelix added this to the 1.0 milestone Mar 20, 2014
@alexcrichton
Copy link
Member

Closing, this is configured now:

http://static.rust-lang.org/foobar

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
`option_if_let_else`: do not trigger on expressions returning `()`

Fix rust-lang#11893

Trigerring on expressions returning `()` uses the arguments of the `map_or_else()` rewrite only for their side effects. This does lead to code which is harder to read than the original.

changelog: [`option_if_let_else`]: do not trigger on unit expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

5 participants