about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
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-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-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-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-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.
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-3/+2
2019-08-15Remove `Spanned` from `mk_name_value_item_str` and `expr_to_spanned_string`Vadim Petrochenkov-5/+5
2019-08-14Merge Variant and Variant_Caio-5/+5
2019-08-11Reduce nesting in externalfiles implementationMark Rousskov-28/+14
Utilize `?` instead of and_then/map operators
2019-08-11Drop RefCell from IdMap in markdown renderingMark Rousskov-30/+21
2019-08-11Remove fmt::Display impls on Markdown structsMark Rousskov-38/+33
These impls prevent ergonomic use of the config (e.g., forcing us to use RefCell) despite all usecases for these structs only using their Display impls once.
2019-08-11Remove thread-local for playground configMark Rousskov-112/+141
2019-08-11Remove unnecessary channelMark Rousskov-6/+3
2019-08-11Use a HashSet instead of VecMark Rousskov-6/+4
2019-08-11Don't store all traits in DocContextMark Rousskov-7/+5
This is already a query so we're just needlessly copying the data around.
2019-08-11Store typed PassesMark Rousskov-68/+65
2019-08-11Replace Arc with Rc around external_traitsMark Rousskov-3/+2
2019-08-11Remove ReentrantMutexMark Rousskov-15/+9
This drops the parking_lot dependency; the ReentrantMutex type appeared to be unused (at least, no compilation failures occurred). This is technically a possible change in behavior of its users, as lock() would wait on other threads releasing their guards, but since we didn't actually remove any threading or such in this code, it appears that we never used that behavior (the behavior change is only noticeable if the type previously was used in two threads, in a single thread ReentrantMutex is useless).
2019-08-11Use entry API in store_pathMark Rousskov-6/+2
2019-08-11Remove crate_name from DocContextMark Rousskov-13/+8
tcx.crate_name is the appropriate way to retrieve the crate name.
2019-08-11Move def_id_to_path to use site in visit_astMark Rousskov-20/+19
2019-08-11rustdoc: Replace HirVec with slices in doctreeMark Rousskov-21/+21
2019-08-11Remove `is_self` and `has_self_ty` methodsMatthew Jasper-1/+3