about summary refs log tree commit diff
path: root/src/librustdoc/html
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-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-26/+0
2019-08-26Move source HTML generation to own moduleMark Rousskov-173/+193
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-11Drop RefCell from IdMap in markdown renderingMark Rousskov-23/+17
2019-08-11Remove fmt::Display impls on Markdown structsMark Rousskov-36/+31
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-102/+130
2019-08-11Store typed PassesMark Rousskov-10/+4
2019-08-11Remove ReentrantMutexMark Rousskov-1/+1
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-10Replace is_doc_reachable with is_publicMark Rousskov-2/+1
2019-08-06Rollup merge of #62837 - Kinrany:patch-1, r=GuillaumeGomezMazdak Farrokhzad-7/+15
Fix theme picker blur handler: always hide instead of switching Fixes a minor bug in UI generated by rustdoc. For example, this page: https://doc.rust-lang.org/std/ Reproduction steps: 1. Click the theme picker twice * The list of themes will be shown and then hidden 2. Click anywhere else * The list of themes will be show again, which is unexpected The bug was caused by blur event handler toggling the state of the element instead of always hiding it regardless of the current state.
2019-08-06Rollup merge of #62821 - GuillaumeGomez:not-listed-methods, r=Mark-SimulacrumMazdak Farrokhzad-3/+5
Not listed methods Fixes #60326. cc @rust-lang/rustdoc r? @QuietMisdreavus
2019-08-05Display methods from DerefMut in the sidebar as wellGuillaume Gomez-3/+5
2019-08-05adapt rustdoc to infailable lexerAleksey Kladov-13/+14
2019-08-05add unknown tokenAleksey Kladov-1/+1
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-15/+15
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-02Fix fallout after rebasevarkor-1/+1
2019-08-02Replace "existential" by "opaque"varkor-15/+15
2019-08-02librustdoc: Unconfigure tests during normal buildVadim Petrochenkov-54/+55
2019-08-01Rollup merge of #62971 - GuillaumeGomez:keyword-sidebar, r=nobodyPietro Albini-1/+2
Add keywords item into the sidebar Fixes #62939. cc @pravic screenshot of the result: ![Screenshot from 2019-07-25 14-29-48](https://user-images.githubusercontent.com/3050060/61874545-f9512080-aee8-11e9-8e8b-aa50216aec94.png) r? @QuietMisdreavus
2019-07-28Update minifier-rs versionGuillaume Gomez-4/+4
2019-07-25Add keywords item into the sidebarGuillaume Gomez-1/+2
2019-07-20Update render.rsKinrany-1/+1
2019-07-20Fix theme picker blur handler: always hide instead of switchingKinrany-7/+15
2019-07-18Replace deref with as_derefYuki Okushi-1/+1
2019-07-18fixed breaking changesBrad Gibson-4/+4
2019-07-12Rollup merge of #62568 - lzutao:replace_may_dangle, r=matthewjasperMazdak Farrokhzad-1/+0
Replace unsafe_destructor_blind_to_params with may_dangle This PR will completely remove support for `#[unsafe_destructor_blind_to_params]` attribute, which is deprecated in #38970 by `[may_dangle]` unsafe attribute. Closes #34761
2019-07-12Auto merge of #61462 - GuillaumeGomez:fix-local-storage, r=Manishearthbors-3/+1
[rustdoc] Fix storage usage when disabled Fixes #61239. @starblue: Can you give a try to this change please? I tried on chrome and firefox and both worked so if you're using another web browser, that might be useful. :) r? @Manishearth
2019-07-11Remove feature gate `dropck_parametricity` completelyLzu Tao-1/+0
Therefore we also remove `#[unsafe_destructor_blind_to_params]` attribute completly.
2019-07-11Remove `MacroKind::ProcMacroStub`Vadim Petrochenkov-3/+0
It's internal to resolve and always results in `Res::Err` outside of resolve. Instead put `DefKind::Fn`s themselves into the macro namespace, it's ok. Proc macro stubs are items placed into macro namespase for functions that define proc macros. https://github.com/rust-lang/rust/pull/52383 The rustdoc test is changed because the old test didn't actually reproduce the ICE it was supposed to reproduce.
2019-07-07Prevent shrinking of "crate select" element on FirefoxDmitry Murzin-0/+1
2019-07-06Rollup merge of #62329 - matklad:no-peeking, r=petrochenkovMazdak Farrokhzad-20/+31
Remove support for 1-token lookahead from the lexer `StringReader` maintained `peek_token` and `peek_span_src_raw` for look ahead. `peek_token` was used only by rustdoc syntax coloring. After moving peeking logic into highlighter, I was able to remove `peek_token` from the lexer. I tried to use `iter::Peekable`, but that wasn't as pretty as I hoped, due to buffered fatal errors. So I went with hand-rolled peeking. After that I've noticed that the only peeking behavior left was for raw tokens to test tt jointness. I've rewritten it in terms of trivia tokens, and not just spans. After that it became possible to simplify the awkward constructor of the lexer, which could return `Err` if the first peeked token contained error.
2019-07-05Rollup merge of #62238 - GuillaumeGomez:fix-code-block-information-icon-pos, ↵Mazdak Farrokhzad-0/+4
r=QuietMisdreavus Fix code block information icon position Fixes #62118. A screenshot of the fix: <img width="720" alt="Screenshot 2019-06-29 at 18 28 59" src="https://user-images.githubusercontent.com/3050060/60386900-edb23b80-9a9b-11e9-9f4f-0f343674348c.png"> r? @rust-lang/rustdoc
2019-07-05Rollup merge of #62123 - jeremystucki:needless_lifetimes_std, r=alexcrichtonMazdak Farrokhzad-2/+2
Remove needless lifetimes (std) Split from #62039
2019-07-04cleanup lexer constructorsAleksey Kladov-11/+11
2019-07-04remove StringReader::peekAleksey Kladov-9/+20
The reader itself doesn't need ability to peek tokens, so it's better if clients implement this functionality. This hopefully becomes especially easy once we use iterator interface for lexer, but this is not too easy at the moment, because of buffered errors.
2019-07-01Convert more usages overChris Gregory-1/+1
2019-07-01Remove needless lifetimesJeremy Stucki-2/+2
2019-06-29Fix code block information icon positionGuillaume Gomez-0/+4
2019-06-26remove unused derives and variantsAndy Russell-7/+0