bors
a651106ad0
Auto merge of #45288 - GuillaumeGomez:tab-key-binding, r=QuietMisdreavus
...
Save the highlighted item when switching tab
To be merged after #45281 .
r? @rust-lang/docs
2017-10-19 23:55:20 +00:00
kennytm
6b505d6a3f
Rollup merge of #45354 - cuviper:unit_doc, r=QuietMisdreavus
...
rustdoc: add a primitive page for "unit"
In `src/libstd/primitive_docs.rs`, a `#[doc(primitive = "unit")]`
section has sat long neglected. This patch teaches rustdoc to recognize
"unit", and steals its trait implementations away from the tuple page.
2017-10-19 01:59:54 +08:00
kennytm
4913b92ff5
Rollup merge of #45281 - GuillaumeGomez:tab-selection, r=QuietMisdreavus
...
Save selected search tab
Fixes #45278 .
r? @rust-lang/docs
2017-10-19 01:59:50 +08:00
Josh Stone
9fda05c0bc
rustdoc: add a primitive page for "unit"
...
In `src/libstd/primitive_docs.rs`, a `#[doc(primitive = "unit")]`
section has sat long neglected. This patch teaches rustdoc to recognize
"unit", and steals its trait implementations away from the tuple page.
2017-10-17 23:03:50 -07:00
bors
0be6863a15
Auto merge of #45290 - GuillaumeGomez:fix-help, r=QuietMisdreavus
...
Hide help when search bar is focused
Fixes #45286
r? @rust-lang/docs
2017-10-17 12:18:25 +00: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
kennytm
5ebad25b08
Rollup merge of #45289 - GuillaumeGomez:fix-doc-help, r=kennytm
...
Fix arrow display
Before:
<img width="1440" alt="screen shot 2017-10-14 at 18 36 18" src="https://user-images.githubusercontent.com/3050060/31577437-a81510e8-b10e-11e7-8249-cf074bb0f59a.png ">
After:
<img width="1440" alt="screen shot 2017-10-14 at 18 36 12" src="https://user-images.githubusercontent.com/3050060/31577436-a7fc0eea-b10e-11e7-96d7-6dc2916ef72f.png ">
r? @rust-lang/docs
2017-10-15 14:21:59 +08:00
Guillaume Gomez
c6ce067216
Hide help when search bar is focused
2017-10-14 18:46:29 +02:00
Guillaume Gomez
5acc185cee
Fix arrow display
2017-10-14 18:35:54 +02:00
Guillaume Gomez
f44232688e
Save current highlighted item in search tab
2017-10-14 18:24:27 +02:00
Guillaume Gomez
45bb03f60c
Save selected search tab
2017-10-14 18:15:20 +02:00
Guillaume Gomez
c729e4dca7
Remove terribly useless and problematic margin when searching on mobile
2017-10-14 15:55:33 +02: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
fb98e3e434
Rollup merge of #45245 - stjepang:more-padding-between-impls, r=QuietMisdreavus
...
Rustdoc: Increase padding between consecutive impls
Currently, [implementors](https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html#implementors ) list is a bit too condensed. More spacing makes the list easier to read.
Check out [this comment](https://github.com/rust-lang/rust/issues/41879#issuecomment-333121118 ) to see what's the effect of this change.
Closes #41879 .
cc @QuietMisdreavus
2017-10-13 23:38:04 +08:00
kennytm
f43c54e1e3
Rollup merge of #45240 - GuillaumeGomez:mobile-sidebar-improvements, r=QuietMisdreavus
...
Mobile sidebar improvements
Very small changes, I just made the width of the sidebar of 100% and centered vertically both items a bit more:
<img width="1440" alt="screen shot 2017-10-12 at 20 00 47" src="https://user-images.githubusercontent.com/3050060/31511496-302bb474-af88-11e7-8dab-2c88799eafcc.png ">
r? @rust-lang/docs
2017-10-13 23:38:03 +08:00
bors
d21c023964
Auto merge of #45055 - GuillaumeGomez:search-tabs, r=QuietMisdreavus
...
Add tabs for search for better information access
A few screenshots:
<img width="1440" alt="screen shot 2017-10-06 at 00 54 51" src="https://user-images.githubusercontent.com/3050060/31256148-032c1a06-aa31-11e7-8e4c-fec59786b8e6.png ">
<img width="1440" alt="screen shot 2017-10-06 at 00 54 58" src="https://user-images.githubusercontent.com/3050060/31256150-03312cb2-aa31-11e7-86f7-8c9f0d8d6d4f.png ">
<img width="1440" alt="screen shot 2017-10-06 at 00 55 00" src="https://user-images.githubusercontent.com/3050060/31256149-0330d456-aa31-11e7-8f89-3b3c824e30b4.png ">
r? @rust-lang/docs
cc @killercup @QuietMisdreavus
2017-10-13 11:34:11 +00:00
Stjepan Glavina
16ec7b949f
Increase padding between consecutive impls
2017-10-12 22:57:51 +02:00
Guillaume Gomez
9da9c3be62
Small improvement for the sidebar on mobile devices
2017-10-12 20:02:29 +02: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
Guillaume Gomez
3a65d12df7
Add tabs for search for better information access
...
Make tabs work
2017-10-09 23:26:10 +02: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
67c9af590d
rustdoc: Style of [src] link for trait implementors
...
A change suggested by @GuillaumeGomez and @QuietMisdreavus.
Also slight reindenting of the appropriate CSS section.
2017-10-01 16:20:56 +03: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
bors
0e6f4cf51c
Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
...
Initial support for `..=` syntax
#28237
This PR adds `..=` as a synonym for `...` in patterns and expressions.
Since `...` in expressions was never stable, we now issue a warning.
cc @durka
r? @aturon
2017-09-27 16:04:31 +00:00
Guillaume Gomez
4e377081ca
Rollup merge of #44789 - GuillaumeGomez:fix-rustdoc-display, r=QuietMisdreavus
...
Fix warning position in rustdoc code blocks
Before:
<img width="1440" alt="screen shot 2017-09-23 at 14 07 08" src="https://user-images.githubusercontent.com/3050060/30773382-b9649288-a06f-11e7-94ec-faa3c3ed999b.png ">
After:
<img width="1440" alt="screen shot 2017-09-23 at 14 58 31" src="https://user-images.githubusercontent.com/3050060/30773384-bdfc9f3e-a06f-11e7-9030-9fb8a5308668.png ">
r? @QuietMisdreavus
2017-09-24 14:01:51 +02:00
Guillaume Gomez
e30abfbfe7
Fix warning position in rustdoc code blocks
2017-09-23 14:06:35 +02: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
Alex Burka
e64efc91f4
Add support for ..= syntax
...
Add ..= to the parser
Add ..= to libproc_macro
Add ..= to ICH
Highlight ..= in rustdoc
Update impl Debug for RangeInclusive to ..=
Replace `...` to `..=` in range docs
Make the dotdoteq warning point to the ...
Add warning for ... in expressions
Updated more tests to the ..= syntax
Updated even more tests to the ..= syntax
Updated the inclusive_range entry in unstable book
2017-09-22 22:05:18 +02: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
Alex Crichton
929215db7c
Rollup merge of #44671 - GuillaumeGomez:run-button, r=steveklabnik
...
Fix run button
r? @QuietMisdreavus
Before:

After:

Quite urgent.
2017-09-18 11:04:28 -05:00
Guillaume Gomez
90ce24ab69
Fix run button
2017-09-18 14:44:28 +02: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
bors
fd4bef54ab
Auto merge of #43949 - GuillaumeGomez:compile_fail_stable, r=alexcrichton
...
Compile fail stable
Since #30726 , we never made the `compile_fail` flag nor the error code check stable. I think it's time to change this fact.
r? @alexcrichton
2017-09-15 08:05:39 +00: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
Corey Farwell
4e646ba713
Rollup merge of #44254 - GuillaumeGomez:const-fix-rustdoc, r=QuietMisdreavus
...
Fix rendering of const keyword for functions
Fixes #44187 .
r? @QuietMisdreavus
2017-09-14 22:32:32 -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
Eduard-Mihai Burtescu
3ce31eb990
rustc: replace usize with u64 and ConstUsize.
2017-09-11 08:41:15 +03: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
bors
f982ff05db
Auto merge of #44274 - Mark-Simulacrum:rustdoc-tests, r=alexcrichton
...
Test rustdoc.
Also fixes the broken tests.
r? @alexcrichton
2017-09-10 01:24:14 +00:00