about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-08-03Fix async-std at the price of breaking half the test suiteJoshua Nelson-7/+0
- Don't mark impl trait as an error
2020-08-01Rollup merge of #74992 - lcnr:fix-generic-param-order, r=GuillaumeGomezManish Goregaokar-28/+13
fix rustdoc generic param order fixes #61292 r? @varkor cc @GuillaumeGomez
2020-07-31fix rustdoc generic param orderBastian Kauschke-28/+13
2020-07-31Make rustdoc share the logger initialization routine with rustc.Oliver Scherer-2/+2
2020-07-31Auto merge of #74955 - P1n3appl3:rustdoc-formats, r=GuillaumeGomezbors-16/+81
Add `--output-format json` for Rustdoc on nightly This enables the previously deprecated `--output-format` flag so it can be used on nightly to host the experimental implementation of [rfc/2963](https://github.com/rust-lang/rfcs/pull/2963). The actual implementation will come in later PRs so for now there's just a stub that gives you an ICE. I'm _pretty_ sure that the logic I added makes it inaccessible from stable, but someone should double check that. @tmandry @jyn514
2020-07-31Auto merge of #74926 - Manishearth:rename-lint, r=jyn514bors-37/+31
Rename intra_doc_link_resolution_failure It should be plural to follow the conventions in https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints
2020-07-30Update driver to add json backendJoseph Ryan-16/+81
2020-07-30Rename the lint againManish Goregaokar-2/+2
2020-07-30Rename to intra_doc_resolution_failuresManish Goregaokar-37/+31
2020-07-30Auto merge of #74929 - Manishearth:rollup-z2vflrp, r=Manishearthbors-4/+4
Rollup of 10 pull requests Successful merges: - #74742 (Remove links to rejected errata 4406 for RFC 4291) - #74819 (Point towards `format_spec`; it is in other direction) - #74852 (Explain why inlining default ToString impl) - #74869 (Make closures and generators a must use types) - #74873 (symbol mangling: use ty::print::Print for consts) - #74902 (Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions) - #74904 (Fix some typos in src/librustdoc/clean/auto_trait.rs) - #74910 (fence docs: fix example Mutex) - #74912 (Fix broken link in unstable book `plugin`) - #74927 (Change the target data layout to specify more values) Failed merges: r? @ghost
2020-07-29Auto merge of #73767 - P1n3appl3:rustdoc-formats, r=tmandrybors-1072/+1203
Refactor librustdoc html backend This PR moves several types out of the librustdoc::html module so that they can be used by a future json backend. These changes are a re-implementation of [some work done 6 months ago](https://github.com/rust-lang/rust/compare/master...GuillaumeGomez:multiple-output-formats) by @GuillaumeGomez. I'm currently working on said json backend and will put up an RFC soon with the proposed implementation. There are a couple of changes that are more substantial than relocating structs to a different module: 1. The `Cache` is no longer part of the `html::render::Context` type and therefor it needs to be explicitly passed to any functions that access it. 2. The driving function `html::render::run` has been rewritten to use the `FormatRenderer` trait which should allow different backends to re-use the driving code. r? @GuillaumeGomez cc @tmandry @betamos
2020-07-29Rename intra_doc_link_resolution_failure -> intra_doc_link_resolution_failuresManish Goregaokar-2/+2
2020-07-29Pass by valueJoseph Ryan-3/+3
2020-07-29Refactor DocFS to fix error handling bugsJoseph Ryan-55/+34
2020-07-29Fix some typos in src/librustdoc/clean/auto_trait.rsJosh Triplett-4/+4
2020-07-29Rollup merge of #74864 - lzutao:ayu-doccolor, r=GuillaumeGomezYuki Okushi-3/+2
ayu theme: Change doccomment color to `#a1ac88` Before: ![image](https://user-images.githubusercontent.com/15225902/88621499-d1cbff80-d0ca-11ea-99c3-5e2632709274.png) After: ![image](https://user-images.githubusercontent.com/15225902/88621471-bf51c600-d0ca-11ea-9455-9c297f50f15f.png) Close #74788
2020-07-28Auto merge of #74855 - jyn514:separate-lints, r=Manishearthbors-90/+100
Separate `missing_doc_code_examples` from intra-doc links These two lints have no relation other than both being nightly-only. This allows stabilizing intra-doc links without stabilizing `missing_doc_code_examples`. Fixes one of the issues spotted by @ollie27 in https://github.com/rust-lang/rust/pull/74430#issuecomment-664693080. r? @Manishearth
2020-07-28ayu theme: Change doccomment color to `#a1ac88`Lzu Tao-3/+2
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-27private_items_doc_tests -> doc_test_lintsJoshua Nelson-3/+3
2020-07-27Move `look_for_tests` to `private_items_doc_tests`Joshua Nelson-56/+61
2020-07-27Separate `missing_doc_code_examples` from intra-doc linksJoshua Nelson-16/+21
These two lints have no relation other than both being nightly-only. This allows stabilizing intra-doc links without stabilizing missing_doc_code_examples.
2020-07-27More requested changesJoseph Ryan-89/+69
2020-07-27Make requested changesJoseph Ryan-20/+24
2020-07-27TODO -> FIXMEJoseph Ryan-1/+1
2020-07-27Pull out more types from htmlJoseph Ryan-14/+16
2020-07-27Extract `Cache` and other types from `html` moduleJoseph Ryan-752/+808
2020-07-27Refactor html backend to use generic interfaceJoseph Ryan-313/+409
2020-07-27Move `Error` and `RenderInfo` out of `html` moduleJoseph Ryan-71/+85
2020-07-27fix rustdocBastian Kauschke-24/+14
2020-07-27introduce PredicateAtomBastian Kauschke-35/+27
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-8/+9
2020-07-27fix rustdocBastian Kauschke-12/+20
2020-07-27rustdocBastian Kauschke-31/+36
2020-07-27`PredicateKint` -> `PredicateKind`, the beginning of the endBastian Kauschke-1/+1
2020-07-26Don't italicize comments in ayu themeJarek Samic-1/+0
2020-07-24Rollup merge of #74572 - Mark-Simulacrum:unify-rustc-depr, r=petrochenkovYuki Okushi-34/+13
Internally unify rustc_deprecated and deprecated This PR intentionally tries to be "featureless" in that the behavior is not altered for either attribute, though it more clearly exposes cases where that is the case in the code.
2020-07-24Rollup merge of #74504 - lzutao:ayu-border-selected-fn, r=GuillaumeGomezYuki Okushi-1/+3
Add right border bar to Dark and Light theme Demo: Light theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662491120 Dark theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662522446 Ayu theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662625685
2020-07-24Rollup merge of #74361 - GuillaumeGomez:theme-logo, r=ManishearthYuki Okushi-0/+12
Improve doc theme logo display Fixes #74350. The first commit cleans up the whitespaces and converts them to tabs. We should definitely write a tidy check for this (will do it in another PR). Screenshots: ![Screenshot from 2020-07-15 14-08-25](https://user-images.githubusercontent.com/3050060/87543748-8581c800-c6a5-11ea-8417-cbf98ebbfd10.png) ![Screenshot from 2020-07-15 14-11-59](https://user-images.githubusercontent.com/3050060/87543747-84e93180-c6a5-11ea-8cea-976b1470e809.png) ![Screenshot from 2020-07-15 14-12-12](https://user-images.githubusercontent.com/3050060/87543745-84509b00-c6a5-11ea-8324-c3c46ab2d9ef.png) r? @lzutao cc @Cldfire
2020-07-24Add right border bar to Dark and Light themeLzu Tao-0/+2
Ayu has it. Adding similar rule to other themes makes users less surprised and makes GUI more consistent.
2020-07-24ayu: Change to less luminous colorLzu Tao-1/+1
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-22rustdoc: Add explanation when linting against public to private item linksDennis Hamester-0/+7
The additional note helps explaining why the lint was triggered and that --document-private-items directly influences the link resolution.
2020-07-22rustdoc: Always warn when linking from public to private itemsDennis Hamester-5/+12
Change the logic such that linking from a public to a private item always triggers intra_doc_link_resolution_failure. Previously, the warning was not emitted when --document-private-items is passed. Also don't rely anymore on the item's visibility, which would falsely trigger the lint now that the check for --document-private-items is gone.
2020-07-22Rollup merge of #74635 - GuillaumeGomez:fix-tooltip-pos, r=ManishearthManish Goregaokar-0/+10
Fix tooltip position if the documentation starts with a code block Fixes #74321. Before: ![before](https://user-images.githubusercontent.com/3050060/88188970-cf842400-cc38-11ea-839b-37e41656837d.png) After: ![after](https://user-images.githubusercontent.com/3050060/88188981-d3b04180-cc38-11ea-8194-713ffe640d3a.png) And in case there is text, it is not being applied: ![after-witness](https://user-images.githubusercontent.com/3050060/88189009-ddd24000-cc38-11ea-9f0a-61dfd0a0cbd0.png) And on mobile it isn't needed so it's not "activated": ![Screenshot from 2020-07-22 17-17-43](https://user-images.githubusercontent.com/3050060/88194698-65bb4880-cc3f-11ea-8513-0043ccca8cfc.png) r? @rust-lang/rustdoc
2020-07-22Rollup merge of #74528 - euclio:intra-link-errors, r=jyn514Manish Goregaokar-181/+173
refactor and reword intra-doc link errors This commit refactors intra-doc link error reporting to deduplicate code and decouple error construction from the type of error. This greatly improves flexibility at each error construction site, while reducing the complexity of the diagnostic creation. This commit also rewords the diagnostics for clarity and style: - Diagnostics should not end in periods. - It's unnecessary to say "ignoring it". Since this is a warning by default, it's already clear that the link is ignored.
2020-07-22Fix tooltip position if the documentation starts with a code blockGuillaume Gomez-0/+10
2020-07-20Migrate rustc_depr uses to use deprecation attributeMark Rousskov-34/+13
This should not be a change in behavior.
2020-07-20refactor and reword intra-doc link errorsAndy Russell-181/+173
This commit refactors intra-doc link error reporting to deduplicate code and decouple error construction from the type of error. This greatly improves flexibility at each error construction site, while reducing the complexity of the diagnostic creation. This commit also rewords the diagnostics for clarity and style: - Diagnostics should not end in periods. - It's unnecessary to say "ignoring it". Since this is a warning by default, it's already clear that the link is ignored.
2020-07-20Rollup merge of #74555 - GuillaumeGomez:important-traits-popup, r=ManishearthManish Goregaokar-0/+5
Improve "important traits" popup display on mobile I implemented what @XAMPPRocky suggested in the [internals thread topic](https://internals.rust-lang.org/t/feedback-on-important-traits-rustdoc-feature/12752/18). I can confirm it works nicely. r? @Manishearth @Manishearth: By the way: I realized that when you click on the "i", you have to click again to make the popup disappear. Do you want me to extend the popup removal to any click outside the popup?
2020-07-20Rollup merge of #74505 - Cldfire:fix-search-focus, r=GuillaumeGomezManish Goregaokar-10/+0
Fix search input focus in ayu theme Closes #74496. Before: ![image](https://user-images.githubusercontent.com/13814214/87868463-d0c8fe80-c963-11ea-9003-aa578d869e98.png) After: ![image](https://user-images.githubusercontent.com/13814214/87868467-dc1c2a00-c963-11ea-89a8-1280f68ff9df.png)
2020-07-20Rollup merge of #74501 - lzutao:css_run_border, r=GuillaumeGomezManish Goregaokar-3/+3
Ayu theme: Use different background color for Run button Make it clearer that there is a button Run there. Demo in https://github.com/rust-lang/rust/pull/74501#issuecomment-660597377 .