rust/src/test/rustdoc-ui/intra-doc
Joshua Nelson 7411a9e7cc rustdoc: link to stable/beta docs consistently in documentation
## User-facing changes

- Intra-doc links to primitives that currently go to rust-lang.org/nightly/std/primitive.x.html will start going to channel that rustdoc was built with. Nightly will continue going to /nightly; Beta will link to /beta; stable compilers will link to /1.52.1 (or whatever version they were built as).
- Cross-crate links from std to core currently go to /nightly unconditionally. They will start going to /1.52.0 on stable channels (but remain the same on nightly channels).
- Intra-crate links from std to std (or core to core) currently go to the same URL they are hosted at; they will continue to do so. Notably, this is different from everything else because it can preserve the distinction between /stable and /1.52.0 by using relative links.

Note that "links" includes both intra-doc links and rustdoc's own
automatically generated hyperlinks.

 ## Implementation changes

- Update the testsuite to allow linking to /beta and /1.52.1 in docs
- Use an html_root_url for the standard library that's dependent on the channel

  This avoids linking to nightly docs on stable.

- Update rustdoc to use channel-dependent links for primitives from an
  unknown crate

- Set DOC_RUST_LANG_ORG_CHANNEL from bootstrap to ensure it's in sync
- Include doc.rust-lang.org in the channel
2021-06-04 14:18:21 -04:00
..
auxiliary [intra-doc links] Don't check feature gates of items re-exported across crates 2021-02-19 11:38:14 -05:00
.gitattributes Move src/test/rustdoc-ui intra-doc tests into a subdirectory 2020-11-28 21:14:09 -05:00
alias-ice.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
alias-ice.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
ambiguity.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
ambiguity.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
anchors.rs Use DiagnosticInfo for anchor failure 2021-04-05 14:32:05 -04:00
anchors.stderr rustdoc: Give a more accurate span for anchor failures 2021-04-17 16:03:03 -04:00
broken-reexport.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
disambiguator-mismatch.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
disambiguator-mismatch.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
double-anchor.rs Move src/test/rustdoc-ui intra-doc tests into a subdirectory 2020-11-28 21:14:09 -05:00
double-anchor.stderr rustdoc: Give a more accurate span for anchor failures 2021-04-17 16:03:03 -04:00
email-address-localhost.rs rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
email-address-localhost.stderr rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
errors.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
errors.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
feature-gate-intra-doc-pointers.rs Feature-gate pointer and reference in intra-doc links 2021-01-17 15:27:35 -05:00
feature-gate-intra-doc-pointers.stderr Feature-gate pointer and reference in intra-doc links 2021-01-17 15:27:35 -05:00
incompatible-primitive-disambiguator.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
incompatible-primitive-disambiguator.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
malformed-generics.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
malformed-generics.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
non-path-primitives.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
non-path-primitives.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
pointer-reexports-allowed.rs [intra-doc links] Don't check feature gates of items re-exported across crates 2021-02-19 11:38:14 -05:00
prim-conflict.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
prim-conflict.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
private-from-crate-level.rs rustdoc: Record crate name instead of using None 2021-03-22 18:18:57 -07:00
private-from-crate-level.stderr rustdoc: Record crate name instead of using None 2021-03-22 18:18:57 -07:00
private.private.stderr Use more appropriate return type for resolve_associated_item 2021-04-05 08:34:17 -04:00
private.public.stderr Use more appropriate return type for resolve_associated_item 2021-04-05 08:34:17 -04:00
private.rs Use more appropriate return type for resolve_associated_item 2021-04-05 08:34:17 -04:00
span-ice-55723.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
span-ice-55723.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
unknown-disambiguator.rs rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
unknown-disambiguator.stderr rustdoc: link to stable/beta docs consistently in documentation 2021-06-04 14:18:21 -04:00
unused-extern-crate.rs Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
unused-extern-crate.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
warning-crlf.rs Move src/test/rustdoc-ui intra-doc tests into a subdirectory 2020-11-28 21:14:09 -05:00
warning-crlf.stderr Rename rustdoc lints to be a tool lint instead of built-in. 2021-03-01 19:29:15 -05:00
warning.rs Move src/test/rustdoc-ui intra-doc tests into a subdirectory 2020-11-28 21:14:09 -05:00
warning.stderr Show macro name in 'this error originates in macro' message 2021-05-12 19:03:06 -04:00