Guillaume Gomez
502e707fa7
Reduce false positives number in rustdoc html diff
2017-09-06 10:05:33 +02:00
bors
ed532c0d93
Auto merge of #44238 - nrc:pulldown-warn, r=@QuietMisdreavus
...
Improve the Pulldown/hoedown warnings
cc #44229
r? @QuietMisdreavus
2017-09-01 13:56:22 +00: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
Mark Simulacrum
fd5a945727
Rollup merge of #44192 - GuillaumeGomez:sub-fields-style, r=QuietMisdreavus
...
Fix invalid display of enum sub-fields docs
Before:
<img width="1440" alt="screen shot 2017-08-30 at 23 17 00" src="https://user-images.githubusercontent.com/3050060/29895433-61f2bf8c-8dd9-11e7-83e8-cf1dca878100.png ">
After:
<img width="1440" alt="screen shot 2017-08-30 at 23 16 48" src="https://user-images.githubusercontent.com/3050060/29895441-66dea042-8dd9-11e7-9576-11b0c770c70b.png ">
cc @nox @rust-lang/docs
2017-08-31 18:07:40 -06: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
bde0071d1d
Fix invalid display of enum sub-fields docs
2017-08-30 23:16:25 +02: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
Ariel Ben-Yehuda
588f83324d
Rollup merge of #44135 - GuillaumeGomez:fix-css-links, r=QuietMisdreavus
...
Fix invalid linker position
Fixes #44120 .
Result isn't "optimal" though because there are spaces at the end of some lines.
2017-08-29 21:41:01 +00:00
Ariel Ben-Yehuda
b1fff23f60
Rollup merge of #43918 - mystor:rustdoc-pound, r=QuietMisdreavus
...
Don't highlight # which does not start an attribute in rustdoc
Currently when we highlight some macros for rustdoc (e.g. `quote!` from https://github.com/dtolnay/quote ), we get really bad syntax highlighting, because we assume that every token between a `#` character and the next `]` in the source must be an attribute.
This patch improves that highlighting behavior to instead only highlight after finding the `[` token after the `#` token.
(NOTE: I've only run this patch against https://github.com/nrc/rustdoc-highlight so if it doesn't build on travis that's why - I don't have a recent rustc build on this laptop)
I'm guessing r? @steveklabnik
2017-08-29 21:40:55 +00: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
Corey Farwell
e9a6dccce0
Rollup merge of #43966 - GuillaumeGomez:remove-dup, r=QuietMisdreavus
...
Remove duplicates in rustdoc
Fixes #43934 .
Two things however:
1. I'm not happy with the current check. It seems completely overkill and unsatisfying.
2. I have no idea how to test if there is only one element and not two.
r? @rust-lang/docs
2017-08-26 06:46:32 -07:00
Guillaume Gomez
b4a32434c0
Remove duplicates in rustdoc
2017-08-24 11:38:58 +02:00
Corey Farwell
4902e6714f
Rollup merge of #43977 - GuillaumeGomez:remove-outline, r=QuietMisdreavus
...
Remove outline when details have focus
r? @rust-lang/docs
(the green outline annoyed me a bit)
2017-08-23 08:44:24 -04:00
Jouan Amate
4729f22f8b
Fixed changes to .in-band CSS
...
:target will specifically override .in-band background
2017-08-22 09:24:18 -07:00
Guillaume Gomez
b8f4e74cbc
Remove outline when details have focus
2017-08-18 21:19:58 +02:00
Jouan Amate
c8d58a306e
Add links for impls
...
Implements a solution for issue #23552
2017-08-18 10:07:12 -07:00
Corey Farwell
235fb23e55
Rollup merge of #43930 - pravic:es5-revert-shorthand, r=frewsxcv
...
Fix ES5 regression with shorthand names.
Reverts 1b6c9605e4 .
I appreciate new features and syntax in Rust, but seriously, don't rewrite anything. Especially if this **breaks** documentation of language itself and every crate hosted at docs.rs.
2017-08-17 10:44:15 -04:00
Corey Farwell
a4387d54dc
Rollup merge of #43891 - Fourchaux:master, r=steveklabnik
...
Fix typos & us spellings
Fixing some typos and non en-US spellings.
(Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-17 10:44:07 -04:00
pravic
cb4a2d5078
Fix ES5 regression with shorthand names.
...
Reverts 1b6c9605e4 .
2017-08-17 12:41:57 +03:00
Michael Layzell
e83c8085a0
Don't highlight # which does not start an attribute in rustdoc
2017-08-16 20:08:27 -04:00
Zack M. Davis
1b6c9605e4
use field init shorthand EVERYWHERE
...
Like #43008 (f668999 ), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Fourchaux
c7104be1a3
Fix typos & us spellings
2017-08-15 21:56:30 +02:00
Corey Farwell
a3a59a1711
Rollup merge of #43862 - QuietMisdreavus:get-in-line-autohide, r=GuillaumeGomez
...
rustdoc: put auto-hidden docblock labels in line with the toggle
before:

after:

(images taken from `std::heap::AllocErr`)
2017-08-14 20:28:47 -04:00
QuietMisdreavus
1f9d032b38
rustdoc: put auto-hidden docblock labels in line with the toggle
2017-08-14 10:54:24 -05:00
Guillaume Gomez
7ebd81377d
Rollup merge of #43782 - nrc:include, r=GuillaumeGomez
...
Fix include! in doc tests
By making the path relative to the current file.
Fixes #43153
[breaking-change] - if you use `include!` inside a doc test, you'll need to change the path to be relative to the current file rather than relative to the working directory.
2017-08-13 11:03:09 +02:00
bors
0ed03e5490
Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichton
...
Expose all OS-specific modules in libstd doc.
1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc.
2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness.
3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed.
Fixes #24658 (Does _not_ fully implement #1998 ).
2017-08-13 03:00:20 +00:00
bors
14fb329e0a
Auto merge of #43736 - ollie27:rustdoc_impls_js, r=QuietMisdreavus
...
rustdoc: Don't add external impls to implementors js
Otherwise impls from not documented crates appear.
Fixes #43701
2017-08-12 22:09:34 +00:00
Guillaume Gomez
742bba0ebf
Rollup merge of #43795 - GuillaumeGomez:improve-variants-doc-style, r=QuietMisdreavus
...
Improve enum variants display
r? @rust-lang/docs
Before:
<img width="1440" alt="screen shot 2017-08-11 at 00 22 54" src="https://user-images.githubusercontent.com/3050060/29194776-728ce0e2-7e2b-11e7-8299-8300cc0c168b.png ">
After:
<img width="1440" alt="screen shot 2017-08-11 at 00 22 57" src="https://user-images.githubusercontent.com/3050060/29194783-78867558-7e2b-11e7-9226-1327fd20163a.png ">
(The doc of the variant is more aligned with the "[-]" now).
2017-08-11 10:20:33 +02:00
Guillaume Gomez
6fac8dc141
Rollup merge of #43760 - ollie27:rustdoc_search_css, r=GuillaumeGomez
...
rustdoc: Fix broken CSS in search results
The layout is currently broken for struct/union fields and enum variants
in the search results when searching from a struct, union or enum page.
Some examples:
https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html?search=start
https://doc.rust-lang.org/nightly/std/option/enum.Option.html?search=some
#34477 was an incomplete fix
2017-08-11 10:20:27 +02:00
Guillaume Gomez
42b06817e6
Rollup merge of #43747 - GuillaumeGomez:fix-css, r=QuietMisdreavus
...
Improve headers linking
r? @QuietMisdreavus
2017-08-11 10:20:25 +02:00
Guillaume Gomez
b6172008bf
Improve enum variants display
2017-08-11 00:34:17 +02:00
Nick Cameron
6d736df76b
doc tests: use the filename from the source file for doc test programs, rather than a dummy name
2017-08-10 17:59:20 +12:00
kennytm
a2b888675a
Implemented #[doc(cfg(...))].
...
This attribute has two effects:
1. Items with this attribute and their children will have the "This is
supported on **** only" message attached in the documentation.
2. The items' doc tests will be skipped if the configuration does not
match.
2017-08-10 13:43:59 +08:00
Oliver Middleton
e5261c0bbf
rustdoc: Fix broken CSS in search results
...
The layout is currently broken for struct/union fields and enum variants
in the search results when searching from a struct, union or enum page.
2017-08-09 13:41:55 +01:00
bors
78efb23586
Auto merge of #43691 - GuillaumeGomez:fix-rustdoc, r=QuietMisdreavus
...
Fix rustdoc
Fixes #43625 .
r? @rust-lang/dev-tools
cc @rust-lang/docs
2017-08-08 22:14:12 +00:00
Guillaume Gomez
8ac4336692
Improve headers linking
2017-08-08 22:16:08 +02:00
Guillaume Gomez
ec0ca3a7c6
Remove all usage of hoedown_buffer_puts
2017-08-08 21:25:39 +02:00
Oliver Middleton
c62a8c5694
rustdoc: Don't add external impls to implementors js
...
Otherwise impls from not documented crates appear.
2017-08-08 15:01:37 +01:00
Guillaume Gomez
d0916c57ca
Remove \0 printing
2017-08-07 22:25:15 +02:00
bors
0188ec6ef8
Auto merge of #43558 - GuillaumeGomez:union-const-colors, r=QuietMisdreavus
...
Union const colors
Fixes #43523
What do you think of these colors:
<img width="1440" alt="screen shot 2017-07-30 at 15 10 57" src="https://user-images.githubusercontent.com/3050060/28753752-6b175a22-7539-11e7-978e-949f3a947d18.png ">
?
2017-08-07 18:19:07 +00:00
Guillaume Gomez
26dd77f4f3
Fix hoedown error in rustdoc
2017-08-06 21:30:39 +02:00
Guillaume Gomez
00b362e332
Fix invalid background highlights and add missing colors
2017-08-06 13:34:24 +02:00