Pietro Albini
a88feabac4
Rollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=QuietMisdreavus
...
[rustdoc] Specific crate search
Reopening of #54706 .
Fixes #54616 .
<img width="1440" alt="screenshot 2018-11-29 at 01 29 11" src="https://user-images.githubusercontent.com/3050060/49191372-979adf80-f376-11e8-963e-e4feb927c1da.png ">
r? @QuietMisdreavus
2018-12-06 07:48:50 +01:00
bors
4988b096e6
Auto merge of #56549 - pietroalbini:rollup, r=pietroalbini
...
Rollup of 15 pull requests
Successful merges:
- #51753 (Document `From` implementations)
- #55563 (Improve no result found sentence in doc search)
- #55987 (Add Weak.ptr_eq)
- #56119 (Utilize `?` instead of `return None`.)
- #56372 (Refer to the second borrow as the "second borrow" in E0501.rs)
- #56388 (More MIR borrow check cleanup)
- #56424 (Mention raw-ident syntax)
- #56452 (Remove redundant clones)
- #56456 (Handle existential types in dead code analysis)
- #56466 (data_structures: remove tuple_slice)
- #56476 (Fix invalid line number match)
- #56497 (cleanup: remove static lifetimes from consts in libstd)
- #56498 (Fix line numbers display)
- #56523 (Added a bare-bones eslint config (removing jslint))
- #56538 (Use inner iterator may_have_side_effect for Cloned)
Failed merges:
r? @ghost
2018-12-05 23:00:36 +00:00
Pietro Albini
64371f1cfe
Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNN
...
Utilize `?` instead of `return None`.
None
2018-12-05 23:54:25 +01:00
bors
14997d56a5
Auto merge of #55933 - euclio:doc-panic, r=QuietMisdreavus
...
emit error when doc generation fails
Fixes #41813 .
The diagnostic looks something like this:
```
error: couldn't generate documentation: No space left on device (os error 28)
|
= note: failed to create or modify "/path/to/crate/target/doc/src/lazycell"
```
2018-12-05 20:27:17 +00:00
Andy Russell
c359f98c7a
emit error when doc generation fails
...
Fixes #41813 .
2018-12-05 10:10:31 -05:00
Corey Farwell
c025d61409
Replace usages of ..i + 1
ranges with ..=i
.
2018-12-04 12:05:19 -08:00
Corey Farwell
9012af6f19
Utilize ?
instead of return None
.
2018-12-04 08:57:34 -08:00
bors
596e10fd32
Auto merge of #55707 - GuillaumeGomez:file-sidebar, r=QuietMisdreavus
...
Add source file sidebar
This is just a start currently but that gives a good overview of what it'll look like:
<img width="1440" alt="screenshot 2018-11-06 at 01 39 15" src="https://user-images.githubusercontent.com/3050060/48035592-05336180-e165-11e8-82e1-5ead0c345eb9.png ">
r? @QuietMisdreavus
2018-12-04 07:00:19 +00:00
bors
91d5d56c00
Auto merge of #55682 - GuillaumeGomez:primitive-sidebar-link-gen, r=QuietMisdreavus
...
Fixes primitive sidebar link generation
Fixes #50746 .
Fixes #55656 .
r? @QuietMisdreavus
2018-12-04 03:34:32 +00:00
Guillaume Gomez
82a7b6fde8
Don't generate suffix for source-file.js
2018-12-03 22:37:34 +01:00
Guillaume Gomez
afe41078ad
Add arrow to the crate select box
2018-11-29 01:29:49 +01:00
Guillaume Gomez
dd717deccb
Add crate filtering
2018-11-28 19:33:33 +01:00
Guillaume Gomez
e87f8cc49b
Source sidebar improvements
2018-11-24 09:49:57 +01:00
Guillaume Gomez
93520d2ad1
Add source file sidebar
2018-11-24 09:49:57 +01:00
Guillaume Gomez
5af8f1d8d7
Fixes primitive sidebar link generation
2018-11-21 19:46:11 +01:00
kennytm
2173681647
Rollup merge of #55136 - GuillaumeGomez:short-doc, r=QuietMisdreavus
...
Remove short doc where it starts with a codeblock
Fixes #54975 .
2018-11-13 19:21:09 +08:00
QuietMisdreavus
2f8ce732e1
move all static-file include!s into a single module
2018-11-10 16:05:29 -06:00
Guillaume Gomez
3030cbea95
Remove short doc where it starts with a codeblock
2018-11-10 19:03:58 +01:00
bors
6cfc603395
Auto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomez
...
rustdoc: refactor: centralize all command-line argument parsing
This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation.
One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time.
One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.
2018-11-05 09:48:46 +00:00
Guillaume Gomez
336b02347f
Rollup merge of #54162 - GuillaumeGomez:hide-default-impls-items, r=QuietMisdreavus
...
Hide default impls items
Follow up of #51885 .
Fixes #54025 .
cc @Mark-Simulacrum
r? @QuietMisdreavus
And screenshots of course:
<img width="1440" alt="screen shot 2018-09-12 at 23 30 35" src="https://user-images.githubusercontent.com/3050060/45454424-1ff8d500-b6e4-11e8-9257-030322495d58.png ">
<img width="1440" alt="screen shot 2018-09-12 at 23 30 42" src="https://user-images.githubusercontent.com/3050060/45454431-2424f280-b6e4-11e8-8d65-db0d85ac18f0.png ">
2018-11-03 13:40:32 +01:00
QuietMisdreavus
1260ad2138
pass the Options struct instead of individual args
2018-11-02 17:17:02 -05:00
QuietMisdreavus
4d6c2765e6
split off a separate RenderOptions struct
2018-11-02 16:41:33 -05:00
QuietMisdreavus
157833c588
swap uses of Matches with pre-parsed args
2018-11-02 16:24:58 -05:00
bors
e53a5ffd6b
Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavus
...
Add index page argument
@Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything?
r? @QuietMisdreavus
2018-11-02 15:39:25 +00:00
Guillaume Gomez
2fd378b82b
Fix sub-variant doc display
2018-10-27 14:05:34 +02:00
kennytm
626b49666f
Rollup merge of #55358 - sinkuu:redundant_clone2, r=estebank
...
Remove redundant clone (2)
2018-10-26 23:06:49 +08:00
kennytm
4212896dca
Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavus
...
Add line numbers option to rustdoc
Fixes #22878 .
r? @QuietMisdreavus
2018-10-26 18:24:57 +08:00
Shotaro Yamada
3878d24ef6
Remove redundant clone
2018-10-26 12:07:39 +09:00
Guillaume Gomez
b2f80ddf34
Fix multiple errors
2018-10-22 00:43:23 +02:00
Guillaume Gomez
edec5807ac
Hide items if they use default docs
2018-10-21 18:28:27 +02:00
Guillaume Gomez
a40b758cd8
Use markdown::render instead of using pulldown_cmark directly
2018-10-21 01:16:18 +02:00
Guillaume Gomez
fb2813bcab
Add index page
2018-10-21 01:15:11 +02:00
Oliver Scherer
3c9258e604
Prefer Default::default
over FxHash*::default
in struct constructors
2018-10-19 14:34:44 +02:00
Oliver Scherer
ee81739dc1
Deprecate the FxHashMap()
and FxHashSet()
constructor function hack
2018-10-19 14:34:44 +02:00
Guillaume Gomez
c5a025aae6
Fix mobile doc display
2018-10-11 22:23:39 +02:00
Guillaume Gomez
e961d397ca
Add line numbers option to rustdoc
2018-10-09 22:55:18 +02:00
QuietMisdreavus
967a6b0241
show "all items" link even if crate doesn't have a version
2018-09-27 09:12:13 -05:00
QuietMisdreavus
63ac3c7b94
add attributes/derives to "all items" page
2018-09-27 09:04:38 -05:00
QuietMisdreavus
27429d9415
add derive macros' helper attributes to doc output
2018-09-26 13:40:08 -05:00
QuietMisdreavus
869ebc4f95
add declaration blocks to attribute/derive pages
2018-09-26 09:18:58 -05:00
QuietMisdreavus
aea1bd0a59
handle proc-macros as macros instead of functions
2018-09-25 14:56:43 -05:00
QuietMisdreavus
354507e61f
shuffle ownership of external_traits
...
constraints:
- clean/inline.rs needs this map to fill in traits when inlining
- fold.rs needs this map to allow passes to fold trait items
- html/render.rs needs this map to seed the Cache.traits map of all
known traits
The first two are the real problem, since `DocFolder` only operates on
`clean::Crate` but `clean/inline.rs` only sees the `DocContext`. The
introduction of early passes means that these two now exist at the same
time, so they need to share ownership of the map. Even better, the use
of `Crate` in a rustc thread pool means that it needs to be Sync, so it
can't use `Lrc<Lock>` to manually activate thread-safety.
`parking_lot` is reused from elsewhere in the tree to allow use of its
`ReentrantMutex`, as the relevant parts of rustdoc are still
single-threaded and this allows for easier use in that context.
2018-09-20 05:54:26 -05:00
QuietMisdreavus
c754e8240c
refactor: move access_levels
into RenderInfo
2018-09-20 05:42:38 -05:00
QuietMisdreavus
e854d39929
don't index trait impls if the trait isn't also documented
2018-09-20 05:42:36 -05:00
QuietMisdreavus
a893117f38
add a bunch of debug prints
2018-09-20 05:42:27 -05:00
Guillaume Gomez
6aed133ebd
Rollup merge of #54097 - GuillaumeGomez:remove-keyword-namespace, r=QuietMisdreavus
...
rustdoc: Remove namespace for keywords
Fixes #54084 .
r? @QuietMisdreavus
2018-09-18 10:21:35 +02:00
Guillaume Gomez
3466d8044f
Rollup merge of #53941 - kzys:sort-impls, r=GuillaumeGomez
...
rustdoc: Sort implementors
Fixes #53812
2018-09-16 12:25:41 +02:00
bors
e7f1880921
Auto merge of #52962 - GuillaumeGomez:few-things, r=QuietMisdreavus
...
Fix trait item doc setting, add new setting, start hiding elements by default and then showing them up
r? @QuietMisdreavus
2018-09-14 01:07:21 +00:00
Kazuyoshi Kato
3dbb741a4b
rustdoc: Sort implementors
...
Fixes #53812
2018-09-12 21:01:14 -07:00
bors
f2302daef3
Auto merge of #53409 - GuillaumeGomez:associated-const-value, r=QuietMisdreavus
...
Don't show associated const value anymore
Part of #44348 .
Before:
<img width="1440" alt="screen shot 2018-08-16 at 00 48 30" src="https://user-images.githubusercontent.com/3050060/44177414-20ef1480-a0ee-11e8-80d4-7caf082cf0de.png ">
After:
<img width="1440" alt="screen shot 2018-08-16 at 00 48 23" src="https://user-images.githubusercontent.com/3050060/44177417-251b3200-a0ee-11e8-956a-4229275e3342.png ">
cc @nox
r? @QuietMisdreavus
2018-09-12 21:20:05 +00:00