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
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
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
Mark Simulacrum
f87696b268
Test rustdoc unit tests.
...
Doc tests are temporarily disabled until next release cycle, since
current beta Cargo errors on them. Upgrade should be smooth as the
relevant tests are already fixed in this commit.
2017-09-05 11:17:52 -06: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
Guillaume Gomez
ccc31ce3d5
set compile_fail flag stable
2017-09-01 22:09:20 +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