-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add link to rustdoc book search chapter in help popover #112740
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
@@ -1068,6 +1068,9 @@ function preLoadCss(cssUrl) { | |||
div_shortcuts.innerHTML = "<h2>Keyboard Shortcuts</h2><dl>" + shortcuts + "</dl></div>"; | |||
|
|||
const infos = [ | |||
"For a full list of all search features, take a look <a \ | |||
href='https://doc.rust-lang.org/stable/rustdoc/how-to-read-rustdoc.html\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should be passing DOC_RUST_LANG_ORG_CHANNEL
through here instead (as well as line 1051)? Probably use getVar
to link to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
06cabcf
to
861c2b8
Compare
@@ -582,6 +583,8 @@ pub(crate) fn has_doc_flag(tcx: TyCtxt<'_>, did: DefId, flag: Symbol) -> bool { | |||
/// | |||
/// Set by `bootstrap::Builder::doc_rust_lang_org_channel` in order to keep tests passing on beta/stable. | |||
pub(crate) const DOC_RUST_LANG_ORG_CHANNEL: &str = env!("DOC_RUST_LANG_ORG_CHANNEL"); | |||
pub(crate) static DOC_CHANNEL: Lazy<&'static str> = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOC_RUST_LANG_ORG_CHANNEL
contains the full URL to the doc. It's not a problem in itself but since it's stored in all generated pages, better to just keep the channel, hence why I stored it this way.
Applied your suggestion. |
861c2b8
to
2f1939a
Compare
Updated! |
r=me when CI passes |
@bors r=notriddle rollup |
…ter, r=notriddle Add link to rustdoc book search chapter in help popover One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book. It looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2) r? `@notriddle`
…ter, r=notriddle Add link to rustdoc book search chapter in help popover One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book. It looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2) r? ``@notriddle``
…ter, r=notriddle Add link to rustdoc book search chapter in help popover One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book. It looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2) r? ```@notriddle```
Fixed the GUI test. Since a GUI failure isn't caught in the CI currently, let's r+ it. @bors r=notriddle rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#112616 (Improve tests on targets without unwinding) - rust-lang#112643 (Always register sized obligation for argument) - rust-lang#112740 (Add link to rustdoc book search chapter in help popover) - rust-lang#112810 (Don't ICE on unnormalized struct tail in layout computation) - rust-lang#112870 (Migrate `item_bounds` to `ty::Clause`) - rust-lang#112925 (Stop hiding const eval limit in external macros) - rust-lang#112960 ([tests/rustdoc] Add `@files` command) - rust-lang#112962 (Fix rustdoc gui tester) r? `@ghost` `@rustbot` modify labels: rollup
One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.
It looks like this:
r? @notriddle