about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2019-09-02Auto merge of #63834 - andjo403:rustdoc-linker-remove, r=Mark-Simulacrumbors-11/+0
remove the unstable rustdoc parameter --linker use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-09-01Rollup merge of #64032 - andjo403:codegen-units, r=Mark-SimulacrumMazdak Farrokhzad-0/+1
rustdoc use -Ccodegen-units=1 by default for test compile as the test is small we do not want split up in multiple codegen units and also as there is multiple test running at the same time this will reduce the number of concurrent threads tested the test time with `./x.py test src/libcore --doc` for my 16 core 32 thread cpu i get about 6% faster execution and my 2 core 4 thread cpu I get about 10% faster execution cc #63638 r? @Mark-Simulacrum
2019-09-01remove the unstable rustdoc parameter --linkerAndreas Jonson-11/+0
use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-08-31Auto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27bors-10/+27
rustdoc: warn on empty doc test Closes #60319. A doc test that only contains whitespace should result in a warning. This PR adds detection of empty doc tests to `check-code-block-syntax`, as having an invalid doc test is mutually exclusive with an empty doc test.
2019-08-30Rollup merge of #63847 - GuillaumeGomez:system-theme-detection, r=kinnisonMazdak Farrokhzad-1/+2
[rustdoc] Fix system theme detection Fixes #63830 The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue. cc @fenhl r? @kinnison
2019-08-30rustdoc use -Ccodegen-units=1 by default for test compileAndreas Jonson-0/+1
as the test is small we do not want split up in multiple codegen units and also as there is multiple test running at the same time this will reduce the number of concurrent threads
2019-08-30Auto merge of #63827 - andjo403:out-of-process-rustc-in-rustdoc, ↵bors-151/+82
r=Mark-Simulacrum Run doctests via out-of-process rustc closes #63638
2019-08-30Auto merge of #63402 - estebank:strip-margin, r=oli-obkbors-1/+2
Strip code to the left and right in diagnostics for long lines Fix #62999.
2019-08-29Run doctests via out-of-process rustcAndreas Jonson-151/+82
2019-08-29Rollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-SimulacrumMazdak Farrokhzad-12/+15
Hide trait default methods Fixes #62499. However, the question remains: do we want to extend it to this point or not? r? @QuietMisdreavus
2019-08-29Auto merge of #63990 - Centril:rollup-q1nt0b0, r=Centrilbors-5/+5
Rollup of 11 pull requests Successful merges: - #63811 (Correctly suggest adding bounds to `impl Trait` argument) - #63933 (Resolve some small issues related to #63580) - #63938 (or-pattern: fix typo in error message) - #63945 (Recover `mut $pat` and other improvements) - #63958 (const_prop: only call error_to_const_error if we are actually showing something) - #63961 (Add Option<Span> to `require_lang_item`) - #63963 (remove the reference to __cxa_thread_atexit_impl) - #63965 (Prevent syntax error in LD linker version script) - #63968 (rustc_apfloat: make the crate #![no_std] explicitly.) - #63970 (Notify me (flip1995) when Clippy toolstate changes) - #63980 (add missing `#[repr(C)]` on the Slices union) Failed merges: - #63989 (Add Yaah to clippy toolstain notification list) r? @ghost
2019-08-29Rollup merge of #63961 - JohnTitor:improve-require-lang-item, r=estebankMazdak Farrokhzad-5/+5
Add Option<Span> to `require_lang_item` Fixes #63954 I'm not sure where to take `Some(span)` or something so I use `None` in many places. r? @estebank
2019-08-29Auto merge of #62855 - Aaron1011:feature/rustdoc-reexport-final, r=petrochenkovbors-11/+40
Improve Rustdoc's handling of procedural macros Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-28Auto merge of #62941 - GuillaumeGomez:save-crate-filter, r=Mark-Simulacrumbors-3/+19
Save crate filtering on rustdoc Fixes #62929. I added a hashmap and a hash encoding for the current crate list in case you have multiple crates handling on a same website (who talked about docs.rs?!). Like that, for each context, you have the filter crate selected. r? @QuietMisdreavus
2019-08-28Save crate filtering on rustdocGuillaume Gomez-3/+19
2019-08-28Auto merge of #63127 - kper:pr, r=nikomatsakisbors-2/+2
Cleanup: Consistently use `Param` instead of `Arg` #62426 Fixes #62426
2019-08-28Add Option<Span> to `require_lang_item`Yuki Okushi-5/+5
2019-08-27Auto merge of #63639 - Mark-Simulacrum:rustdoc-clean-3, r=GuillaumeGomezbors-507/+442
rustdoc: general cleanup
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-2/+2
2019-08-27Rollup merge of #62600 - emmericp:libtest-add-show-output, r=gnzlbgMazdak Farrokhzad-2/+2
libtest: add --show-output flag to print stdout of successful tests This pull request adds a new flag `--show-output` for tests to show the output of successful tests. For most formatters this was already supported just not exposed via the CLI (apparently only used by `librustdoc`). I've also added support for this option in the JSON formatter. This kind of fixes https://github.com/rust-lang/rust/issues/54669 which wants `--format json` to work with `--nocapture`, which is... well, impossible. What this issue really calls for is `--show-output` as implemented here.
2019-08-26Shorten line during rendering instead of in markdownMark Rousskov-44/+36
2019-08-26Inline recurse into only callsiteMark Rousskov-57/+40
2019-08-26Transition a few fmt::Display impls to functionsMark Rousskov-52/+56
This introduces a WithFormatter abstraction that permits one-time fmt::Display on an arbitrary closure, created via `display_fn`. This allows us to prevent allocation while still using functions instead of structs, which are a bit unwieldy to thread arguments through as they can't easily call each other (and are generally a bit opaque). The eventual goal here is likely to move us off of the formatting infrastructure entirely in favor of something more structured, but this is a good step to move us in that direction as it makes, for example, passing a context describing current state to the formatting impl much easier.
2019-08-26Inline RawMutableSpaceMark Rousskov-16/+7
2019-08-26Store only the current depthMark Rousskov-11/+11
Previously we stored the entire current path which is a bit expensive and only ever accessed its length. This stores the length directly.
2019-08-26Remove support for printing HRef in alternate modeMark Rousskov-11/+8
The alternate mode merely prints out the passed in text which is largely useless (as the text can simply be directly printed).
2019-08-26Remove dead tracking of external param namesMark Rousskov-45/+0
2019-08-26Mutate DocContext from LibEmbargoVisitor and RustdocVisitorMark Rousskov-27/+23
We have &mut access, so remove the RefCell borrowing
2019-08-26Move top-level Clean impl to functionMark Rousskov-87/+83
This allows us to pass it a `&mut DocContext` which will allow removal of RefCells, etc. in the following commits. It's also somewhat a unique Clean impl in that it previously ignored `self` (re-retriveing hir::Crate), which it no longer needs to do.
2019-08-26Move source HTML generation to own moduleMark Rousskov-173/+194
2019-08-25Auto merge of #61613 - sinkuu:impl_trait_inline, r=ollie27bors-67/+214
Support `impl Trait` in inlined documentation `impl Trait` in argument position was not properly rendered when inlined from other crates. ([a live example on docs.rs](https://docs.rs/libp2p/0.8.1/libp2p/floodsub/struct.Floodsub.html#method.unsubscribe)) ![old](https://user-images.githubusercontent.com/7091080/59089838-14ba9900-8946-11e9-830b-53b317bdecb4.png) ↓ ![new](https://user-images.githubusercontent.com/7091080/59089844-16845c80-8946-11e9-9fe3-8998af9d73ce.png)
2019-08-25Fix system theme detectionGuillaume Gomez-1/+2
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-11/+40
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-22Rollup merge of #63782 - GuillaumeGomez:theme-switch-fix, r=kinnisonMazdak Farrokhzad-14/+14
Fix confusion in theme picker functions To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again. The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected. r? @kinnison
2019-08-21Add terminal_width debugging flagEsteban Küber-1/+2
2019-08-21Fix confusion in theme picker functionsGuillaume Gomez-14/+14
2019-08-21Replaced skipStorage with saveTheme variableGuillaume Gomez-4/+4
2019-08-21take into account the system themeGuillaume Gomez-3/+28
2019-08-19librustdoc: warn on empty doc testTom Milligan-10/+27
2019-08-19Fix ICE with `impl Trait` in type boundsShotaro Yamada-3/+10
2019-08-19Use BTreeMap for deterministic iter orderShotaro Yamada-6/+5
2019-08-19Support nested `impl Trait`Shotaro Yamada-25/+33
2019-08-19Associated type bound for inlined impl Trait docShotaro Yamada-68/+121
2019-08-19Support `impl Trait` in inlined documentationShotaro Yamada-22/+102
2019-08-19Auto merge of #63463 - matthewjasper:ty_param_cleanup, r=petrochenkovbors-2/+4
Don't special case the `Self` parameter by name This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse. closes #50125 cc #60869
2019-08-18Pre intern the `Self` parameter typeMatthew Jasper-2/+2
Use this to simplify the object safety code a bit.
2019-08-17Initial implementation of or patternsvarkor-0/+3
2019-08-15resolve: `ParentScope::default` -> `ParentScope::module`Vadim Petrochenkov-1/+1
2019-08-15resolve: Add `ParentScope::default`, eliminate `dummy_parent_scope`Vadim Petrochenkov-1/+2
Remove some unnecessary parameters from functions
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-1/+1
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.