Jarek Samic
085679c841
Use theme-adaptive SVG favicon from other Rust sites
2020-09-23 21:31:27 -04:00
Dylan DPC
ed39e6d60a
Rollup merge of #76078 - jyn514:no-disambiguator, r=manishearth
...
Remove disambiguators from intra doc link text
Closes https://github.com/rust-lang/rust/issues/65354 .
r? @Manishearth
The commits are mostly atomic, but there might be some mix between them here and there. I recommend reading 'refactor ItemLink' and 'refactor RenderedLink' on their own though, lots of churn without any logic changes.
2020-09-05 16:28:26 +02:00
bors
62dad457bc
Auto merge of #73819 - euclio:rustdoc-summaries, r=jyn514,GuillaumeGomez
...
rustdoc: do not use plain summary for trait impls
Fixes #38386 .
Fixes #48332 .
Fixes #49430 .
Fixes #62741 .
Fixes #73474 .
Unfortunately this is not quite ready to go because the newly-working links trigger a bunch of linkcheck failures. The failures are tough to fix because the links are resolved relative to the implementor, which could be anywhere in the module hierarchy.
(In the current docs, these links end up rendering as uninterpreted markdown syntax, so I don't think these failures are any worse than the status quo. It might be acceptable to just add them to the linkchecker whitelist.)
Ideally this could be fixed with intra-doc links ~~but it isn't working for me: I am currently investigating if it's possible to solve it this way.~~ Opened #73829 .
EDIT: This is now ready!
2020-09-03 19:07:38 +00:00
Joshua Nelson
9815010d8f
Remove disambiguators from link text
...
Related to https://github.com/rust-lang/rust/issues/65354
- Pass through the replacement text to `markdown.rs`
- Add some tests
- Add a state machine that actually replaces the text when parsing Markdown
2020-09-03 09:29:22 -04:00
Joshua Nelson
31a7b6e832
Refactor RenderedLink into its own type
2020-09-03 09:29:21 -04:00
Camelid
c86d249e94
Use "Fira Sans" for crate list font
...
Fira Sans is what's used for module lists and other item lists.
Previously, the default body font, "Source Serif Pro", was used for
crate lists, which didn't visually match other item lists.
2020-09-01 13:41:56 -07:00
Guillaume Gomez
c9a48d1d73
Fix strings indent
2020-08-31 13:16:50 +02:00
Andy Russell
e0822ecdbc
rustdoc: do not use plain summary for trait impls
...
Fixes #38386 .
Fixes #48332 .
Fixes #49430 .
Fixes #62741 .
Fixes #73474 .
2020-08-30 12:02:18 -04:00
Pietro Albini
8730c2beb7
Rollup merge of #75330 - Nemo157:improve-doc-cfg-features, r=GuillaumeGomez
...
Improve rendering of crate features via doc(cfg)
The current rendering of crate features with `doc(cfg(feature = ".."))` is verbose and unwieldy for users, `doc(cfg(target_feature = ".."))` is special-cased to make it render nicely, and a similar rendering can be applied to `doc(cfg(feature))` to make it easier for users to read.
I also added special casing of `all`/`any` cfgs consisting of just `feature`/`target-feature` to remove the repetitive "target/crate feature" prefix.
The downside of this current rendering is that there is no distinction between `feature` and `target_feature` in the shorthand display. IMO this is ok, or if anything `target_feature` should have a more verbose shorthand, because `doc(cfg(feature = ".."))` usage is going to vastly outstrip `doc(cfg(target_feature = ".."))` usage in non-stdlib crates when it eventually stabilizes (or even before that given the number of crates using `cfg_attr(docsrs)` like constructs).
## Previously
<img width="259" alt="Screenshot 2020-08-09 at 13 32 42" src="https://user-images.githubusercontent.com/81079/89731110-d090c000-da44-11ea-96fa-56adc6339123.png ">
<img width="438" alt="image" src="https://user-images.githubusercontent.com/81079/89731116-d7b7ce00-da44-11ea-87c6-022d192d6eca.png ">
<img width="765" alt="image" src="https://user-images.githubusercontent.com/81079/89731152-24030e00-da45-11ea-9552-1c270bff2729.png ">
<img width="671" alt="image" src="https://user-images.githubusercontent.com/81079/89731158-28c7c200-da45-11ea-8acb-97d8a4ce00eb.png ">
## Now
<img width="216" alt="image" src="https://user-images.githubusercontent.com/81079/89731123-e1d9cc80-da44-11ea-82a8-5900bd9448a5.png ">
<img width="433" alt="image" src="https://user-images.githubusercontent.com/81079/89731127-e8684400-da44-11ea-9d18-572fd810f19f.png ">
<img width="606" alt="image" src="https://user-images.githubusercontent.com/81079/89731162-2feed000-da45-11ea-98d2-8a88c364d903.png ">
<img width="669" alt="image" src="https://user-images.githubusercontent.com/81079/89731991-ccb46c00-da4b-11ea-9416-cd20a3193826.png ">
cc #43781
2020-08-28 10:23:53 +02:00
bors
18b0585b52
Auto merge of #75842 - camelid:highlight-crate-links, r=jyn514
...
Highlight crate links like normal links
Fixes #75823 .
Cc @jyn514
2020-08-27 02:51:01 +00:00
Camelid
4419e04f16
Highlight crate links like normal links
2020-08-23 10:24:19 -07:00
Joshua Nelson
a97d65d6e4
rustdoc: Rename misleading function
...
- `is_associated` -> `is_type_alias`
`is_associated` is not a good name for what this is doing. If you look at
https://github.com/rust-lang/rust/pull/74489/files#diff-6a301d597807ee441a41e7237800563dR296 ,
is_associated() and as_assoc_kind() do completely different things, but
from the name it sounds like they're similar.
2020-08-22 00:22:43 -04:00
Wim Looman
3328bd9a0f
Add long cfg description to tooltip on short description
2020-08-18 22:35:50 +02:00
Tyler Mandry
c18b64c866
Rollup merge of #75378 - petrochenkov:isident, r=Mark-Simulacrum
...
Introduce `rustc_lexer::is_ident` and use it in couple of places
Implements the suggestion from https://github.com/rust-lang/rust/pull/74537#issuecomment-662261979 .
2020-08-11 12:28:32 -07:00
Yuki Okushi
a75bdfa230
Rollup merge of #75347 - fusion-engineering-forks:rustdoc-nat-sort, r=GuillaumeGomez
...
Rustdoc: Fix natural ordering to look at all numbers.
The old implementation only looks at numbers at the end, but not in other places in a name: `u8` and `u16` got sorted properly, but `u8_bla` and `u16_bla` did not.

2020-08-11 16:23:52 +09:00
Mark Rousskov
6bbf4558ac
Feature gate is always present
2020-08-11 00:08:04 +03:00
Mara Bos
8c705f83db
Rustdoc: Fix natural ordering to look at all numbers.
...
The old implementation only looks at numbers at the end, but not in
other places in a name: "u8" and "u16" got sorted properly, but "u8_bla"
and "u16_bla" did not.
2020-08-09 23:05:35 +02:00
Camelid
f3cc957f2e
Rename "Important traits" to "Notable traits"
...
* Rename it in the UI
* Rename the CSS classes
2020-08-09 12:09:05 -07:00
Joseph Ryan
29df0508f3
Pass by value
2020-07-29 16:48:22 -05:00
Joseph Ryan
7621a5b635
Refactor DocFS to fix error handling bugs
2020-07-29 16:15:31 -05:00
Joseph Ryan
cee8023c69
More requested changes
2020-07-27 17:34:17 -05:00
Joseph Ryan
3d707a008e
Make requested changes
2020-07-27 16:00:39 -05:00
Joseph Ryan
a790952254
Pull out more types from html
2020-07-27 16:00:38 -05:00
Joseph Ryan
6a4396b98c
Extract Cache
and other types from html
module
2020-07-27 16:00:38 -05:00