bors
fc3e12a03c
Auto merge of #45187 - GuillaumeGomez:doc-ui-improvement, r=QuietMisdreavus
...
Improve sidebar rendering and add methods list
I suppose it can be reviewed as is, but this is just the first step of a more global plan.
cc @rust-lang/docs @nical
And a screenshot of course:
<img width="1440" alt="screen shot 2017-10-10 at 23 38 45" src="https://user-images.githubusercontent.com/3050060/31412170-657beaf6-ae14-11e7-9f01-1e562a034595.png ">
2017-11-01 01:45:58 +00:00
Guillaume Gomez
6fa521c491
Fix weird bugs
2017-10-28 17:24:09 +02:00
Guillaume Gomez
3dafd2c690
Encode urls
2017-10-27 23:09:18 +02:00
Guillaume Gomez
7bde591327
Change sidebar items order
2017-10-27 23:09:18 +02:00
Guillaume Gomez
8fb1250aba
Improve sidebar rendering and add methods list
2017-10-27 23:09:18 +02:00
Paul Lietar
77f7e85d7f
Implement RFC 1861: Extern types
2017-10-27 23:01:34 +02:00
Guillaume Gomez
11b2b08ba9
Display rustdoc pulldown switch warnings everytime
2017-10-16 21:41:10 +02:00
bors
c4f489af91
Auto merge of #44613 - QuietMisdreavus:rustdoc-perf, r=michaelwoerister
...
some low-hanging rustdoc optimizations
There were a few discussions earlier today in #rust-internals about the syscall usage and overall performance of rustdoc. This PR is intended to pick some low-hanging fruit and try to rein in some of the performance issues of rustdoc.
2017-10-15 17:48:12 +00:00
QuietMisdreavus
2c9d452a29
rustdoc: wrap redirect page writers in a BufWriter
2017-10-13 15:26:38 -05:00
QuietMisdreavus
9e1c577b71
rustdoc: don't create directories more than once
2017-10-13 15:26:13 -05:00
kennytm
445bbde784
Rollup merge of #44989 - QuietMisdreavus:what-is-your-quest, r=GuillaumeGomez
...
let rustdoc print the crate version into docs
This PR adds a new unstable flag to rustdoc, `--crate-version`, which when present will add a new entry to the sidebar of the root module, printing the given version number:

Closes #24336
(The WIP status is because i don't want to merge this until i can get the std docs to use it, which i need help from rustbuild people to make sure i get right.)
2017-10-13 01:58:36 +08:00
bors
fbb5054fa9
Auto merge of #44969 - QuietMisdreavus:impls-for-everyone, r=steveklabnik
...
document trait impls when the type appears in the trait's generics
Fixes #25264

2017-10-12 01:00:15 +00:00
QuietMisdreavus
fcee950660
let rustdoc print the crate version into docs
2017-10-09 09:56:17 -05:00
QuietMisdreavus
23f5fbee45
document trait impls when the type appears in the trait's generics
2017-10-01 21:25:48 -05:00
Vitaly _Vi Shukela
9f02e1a938
rustdoc: Render [src] links for trait implementors ( #43893 )
2017-09-29 14:33:02 +03:00
Vitaly _Vi Shukela
87d7520d0f
rustdoc: Extract converter from Impementor to Item to a fn
2017-09-29 14:32:57 +03:00
Corey Farwell
7d75781cc2
Rollup merge of #44554 - GuillaumeGomez:add-missing-pub, r=QuietMisdreavus
...
Add pub visibility for methods as well
Fixes #44527 .
r? @QuietMisdreavus
2017-09-23 00:29:09 -04:00
bors
54996837a3
Auto merge of #44350 - GuillaumeGomez:id-false-positive, r=QuietMisdreavus
...
Improve how rustdoc warnings are displayed
cc @rust-lang/dev-tools
r? @nrc
2017-09-20 02:46:25 +00:00
Guillaume Gomez
7aa5367236
Improve how warnings are displayed
2017-09-19 23:21:28 +02:00
Guillaume Gomez
203d71f507
Add pub visibility for methods as well
2017-09-19 21:17:53 +02:00
bors
9a00f3cc30
Auto merge of #44026 - QuietMisdreavus:trimmed-std, r=steveklabnik
...
hide internal types/traits from std docs via new #[doc(masked)] attribute
Fixes #43701 (hopefully for good this time)
This PR introduces a new parameter to the `#[doc]` attribute that rustdoc looks for on `extern crate` statements. When it sees `#[doc(masked)]` on such a statement, it hides traits and types from that crate from appearing in either the "Trait Implementations" section of many type pages, or the "Implementors" section of trait pages. This is then applied to the `libc`/`rand`/`compiler_builtins` imports in libstd to prevent those crates from creating broken links in the std docs.
Like in #43348 , this also introduces a feature gate, `doc_masked`, that controls the use of this parameter.
To view the std docs generated with this change, head to https://tonberry.quietmisdreavus.net/std-43701/std/index.html .
2017-09-19 04:20:56 +00:00
Guillaume Gomez
e47279f512
Add more links and put the link character to the left
2017-09-17 22:11:37 +02:00
Tim Neumann
49bc845807
Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavus
...
Codeblock color
<img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png ">
This screenshot has been generated from:
```rust
/// foo
///
/// ```compile_fail
/// foo();
/// ```
///
/// ```ignore
/// goo();
/// ```
///
/// ```
/// let x = 0;
/// ```
pub fn bar() -> usize { 2 }
```
r? @QuietMisdreavus
cc @rust-lang/docs
2017-09-17 13:19:02 +02:00
Corey Farwell
9761a8dc14
Rollup merge of #44368 - ollie27:rustdoc_pulldown_ids, r=QuietMisdreavus
...
rustdoc: Don't counts ids twice when using --enable-commonmark
cc @GuillaumeGomez
r? @QuietMisdreavus
2017-09-14 22:32:33 -04:00
Guillaume Gomez
742ff5a489
Fix rendering of const keyword for functions
2017-09-12 21:55:24 +02:00
Guillaume Gomez
79f888da68
Add arrow and improve display
2017-09-11 22:31:37 +02:00
Guillaume Gomez
a095ee48d5
Add class for codeblocks
2017-09-11 22:31:02 +02:00
Guillaume Gomez
65fd1a20b0
Rollup merge of #44347 - GuillaumeGomez:rustdoc-false-positive, r=QuietMisdreavus
...
Reduce false positives number in rustdoc html diff
cc @rust-lang/dev-tools
r? @nrc
Very simple trick but should lighten html diff a bit
2017-09-10 14:03:23 +02:00
Guillaume Gomez
078e1c546c
Rollup merge of #44329 - nrc:pulldown-warn-fix, r=ollie27
...
Fixup some nits from #44238
r? @ollie27
2017-09-10 14:03:21 +02:00
Oliver Middleton
55f90877ee
rustdoc: Don't counts ids twice when using --enable-commonmark
2017-09-06 16:20:44 +01:00
Guillaume Gomez
502e707fa7
Reduce false positives number in rustdoc html diff
2017-09-06 10:05:33 +02:00
Nick Cameron
05739498c2
Fixup some nits from #44238
2017-09-06 08:34:39 +12:00
QuietMisdreavus
c491e195c4
new attribute #[doc(masked)] to hide internal crates from std docs
2017-09-05 13:50:37 -05:00
QuietMisdreavus
a9f0f6df94
add "Implementations on Foreign Types" to the sidebar
2017-09-05 11:21:18 -05:00
QuietMisdreavus
b357a9c09c
if not showing default docs on an impl, autohide the items
2017-09-05 11:21:18 -05:00
QuietMisdreavus
30e526805d
rustdoc: add new "Implementations on Foreign Types" section to traits
2017-09-05 11:21:14 -05:00
Nick Cameron
fbb1612846
Windows line endings
2017-09-01 16:15:25 +12:00
Nick Cameron
abc0530279
Do a better job of eliding whitespace-only differences from warnings
2017-09-01 15:34:44 +12:00
Nick Cameron
1a8aac3f02
Improve the appearance of markdown warnings
2017-09-01 15:34:26 +12:00
Nick Cameron
9ab20a3865
rustdoc: collect rendering warnings and print them in one place
2017-09-01 12:24:26 +12:00
Nick Cameron
a5f50a9dee
Only emit warnings if the user is using Pulldown
...
Also checks for differences after eliminating whitespace-only diffs.
Renames get_html_diff
2017-09-01 11:22:18 +12:00
bors
97b01abf3d
Auto merge of #41991 - GuillaumeGomez:rustdoc-html-diff, r=nrc
...
Add warnings when rustdoc html rendering differs
2017-08-31 08:52:03 +00:00
Guillaume Gomez
9b26f3ad25
Remove some false positive issues
2017-08-30 11:46:58 +02:00
Guillaume Gomez
f2774b7ac3
Print warning whatever the rendering mode
2017-08-30 09:40:43 +02:00
Guillaume Gomez
e1367ef1b1
Update unstable-crate test
2017-08-30 09:40:43 +02:00
Guillaume Gomez
274543b9ca
Add warnings when rustdoc html rendering differs
2017-08-30 09:40:43 +02:00
Guillaume Gomez
f50bf8636e
Fix invalid linker position
2017-08-28 22:40:09 +02:00
Corey Farwell
b4dcdee0fd
Rollup merge of #43979 - Jouan:Add-links-for-impls, r=GuillaumeGomez
...
Add links for impls
Implements a solution for issue #23552
r? @QuietMisdreavus
2017-08-26 06:46:33 -07:00
Guillaume Gomez
b4a32434c0
Remove duplicates in rustdoc
2017-08-24 11:38:58 +02:00
Jouan Amate
c8d58a306e
Add links for impls
...
Implements a solution for issue #23552
2017-08-18 10:07:12 -07:00