about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-05-27Rollup merge of #72610 - GuillaumeGomez:revert-unwanted-css-changes, r=Dylan-DPCDylan DPC-9/+0
Remove font-display settings Since for the moment, the result isn't as expected since #72092 when not using docs locally, let's revert them. r? @Dylan-DPC
2020-05-26Rollup merge of #72294 - GuillaumeGomez:js-cleanup, r=kinnisonDylan DPC-298/+304
JS cleanup The goal here is just to improve the source code a bit. I recommend to review one commit at a time, otherwise it might not make much sense. :) The biggest commit is the second one: to prevent to have "global" variables declared in `main.js` (and thus prevent name conflict or overwriting), I moved such code into anonymous functions. r? @kinnison cc @rust-lang/rustdoc
2020-05-26Improve formattingGuillaume Gomez-2/+2
2020-05-26Remove font-display settingsGuillaume Gomez-9/+0
2020-05-26Auto merge of #71900 - GuillaumeGomez:clean-up-rustdoc, r=ollie27,kinnisonbors-50/+51
Clean up rustdoc source code Fixes #70498. r? @kinnison cc @rust-lang/rustdoc
2020-05-26Fix eslint lintsGuillaume Gomez-34/+34
2020-05-26Reexported functions are now declared directly as "windows" fieldGuillaume Gomez-11/+6
2020-05-26Move "global" code into anonymous functionsGuillaume Gomez-248/+258
2020-05-26Move focusSearchBar and defocusSearchBar functions to the top of the file ↵Guillaume Gomez-10/+11
with other functions
2020-05-24Auto merge of #72362 - matthewjasper:remove-rescope, r=nikomatsakisbors-1/+0
Remove ReScope `ReScope` is unnecessary now that AST borrowck is gone and we're erasing the results of region inference in function bodies. This removes about as much of the old regionck code as possible without having to enable NLL fully. cc #68261 r? @nikomatsakis
2020-05-24Rollup merge of #72092 - workingjubilee:patch-2, r=GuillaumeGomezDylan DPC-0/+9
Unblock font loading in rustdoc.css rustdoc's font loading defaults to "auto", so browsers may block render. But rustdoc's case prefers a faster TTI for scrolling, this means the strictest font-display in use should be "swap". rustdoc's fonts do provide notable legibility improvements but first-time users will have little trouble reading without. This means "optional" is preferred. The one exception is Source Serif Pro: it's a big difference for body text, so "fallback" is preferred over "optional" to cause a (tiny) block. This follows up on (but does not resolve) #20962, taking PageSpeed Insight's rec fairly directly. Supporting reading material: https://drafts.csswg.org/css-fonts-4/#font-display-desc
2020-05-22Remove ReScopeMatthew Jasper-1/+0
2020-05-22Allow using `Self::` in docTymoteusz Jankowski-4/+50
2020-05-21Rollup merge of #72421 - GuillaumeGomez:fix-impl-hover-anchor, r=kinnisonRalf Jung-1/+1
Fix anchor display when hovering impl A little gif for the fixed behaviour: ![hover-anchor](https://user-images.githubusercontent.com/3050060/82549808-cfdf4080-9b5d-11ea-9495-2b1d90b2a791.gif) r? @kinnison
2020-05-21Rollup merge of #72347 - xliiv:72340-impl-for-default, r=GuillaumeGomezRalf Jung-26/+35
Make intra-link resolve links for both trait and impl items Closes #72340
2020-05-21Rollup merge of #72055 - lcnr:predicate-kind, r=nikomatsakisRalf Jung-23/+21
Intern predicates Implements the first step of https://github.com/rust-lang/compiler-team/issues/285 Renames `ty::Predicate` to `ty::PredicateKind`, which is now interned. To ease the transition, `ty::Predicate` is now a struct containing a reference to `ty::PredicateKind`. r? @ghost
2020-05-21Rollup merge of #72272 - ↵Ralf Jung-0/+6
GuillaumeGomez:fix-back-on-page-with-search-behaviour, r=kinnison Fix going back in history to a search result page on firefox This bug was actually firefox not re-running JS script when you go back in history. To trigger it on the current docs: * Make a search * Pick an element (which isn't on the same page as the current element!) * Go back in history Instead of having the search results, you'll see the normal doc page. You can find a small explanation about it [here](http://web.archive.org/web/20100428053932/http://www.firefoxanswer.com/firefox/672-firefoxanswer.html). r? @kinnison cc @ollie27
2020-05-21Fix anchor display when hovering implGuillaume Gomez-1/+1
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-7/+7
2020-05-20make `to_predicate` take a `tcx` argumentNiko Matsakis-1/+1
2020-05-20rename `Predicate` to `PredicateKind`, introduce aliasBastian Kauschke-19/+17
2020-05-19Fix going back in history to a search result page on firefoxGuillaume Gomez-0/+6
2020-05-19Make intra-link resolve links for both trait and impl itemsTymoteusz Jankowski-26/+35
2020-05-17Assume unevaluated consts are equal to the other consts and add ConstEquate ↵Ben Lewis-1/+2
obligation. This delays the need to evaluate consts eagerly and therefore gets around const eval query cycles.
2020-05-16Rollup merge of #71724 - GuillaumeGomez:doc-alias-improvements, r=ollie27Dylan DPC-104/+149
Doc alias improvements After [this message](https://github.com/rust-lang/rust/issues/50146#issuecomment-496601755), I realized that the **doc alias**. So this PR does the followings: * Align the alias discovery on items added into the search-index. It brings a few nice advantages: * Instead of cloning the data between the two (in rustdoc source code), we now have the search-index one and aliases which reference to the first one. So we go from one big map containing a lot of duplicated data to just integers... * In the front-end (main.js), I improved the code around aliases to allow them to go through the same transformation as other items when we show the search results. * Improve the search tester in order to perform multiple requests into one file (I think it's better in this case than having a file for each case considering how many there are...) * I also had to add the new function inside the tester (`handleAliases`) Once this PR is merged, I intend to finally stabilize this feature. r? @ollie27 cc @rust-lang/rustdoc
2020-05-15Rollup merge of #72173 - xliiv:54172-intra-for-trait-impl, r=GuillaumeGomezDylan DPC-11/+55
Make intra links work inside trait impl block Closes #54172
2020-05-14* Update aliases data struct from HashMap to BTreeMap to have more ↵Guillaume Gomez-12/+11
deterministic results * Update Javascript to take this change into account * Update CrateData::aliases field to take a reference instead (it allowed to remove a conversion loop)
2020-05-14Make current crate aliases go firstGuillaume Gomez-6/+14
2020-05-14Move doc alias discovery into the Attributes struct and some code improvementsGuillaume Gomez-39/+15
2020-05-14Rollup merge of #72150 - jackh726:unnorm_projection, r=nikomatsakisRalf Jung-1/+0
Remove UnnormalizedProjection This was only used for the old chalk integration with chalk-engine r? @nikomatsakis
2020-05-13Make intra links work inside trait impl blockTymoteusz Jankowski-11/+55
2020-05-12Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomezDylan DPC-3/+11
Add strikethrough support to rustdoc Implements uncontroversial part of #71183. r? @GuillaumeGomez
2020-05-12Remove ty::UnnormalizedProjectionJack Huey-1/+0
2020-05-11Rollup merge of #72109 - matthiaskrgr:cl8ppy, r=Dylan-DPCDylan DPC-7/+5
Fix clippy warnings Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed} r? @Dylan-DPC
2020-05-11Rollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27Dylan DPC-1/+4
Deprecated emoji Fixes #67872. r? @kinnison cc @rust-lang/rustdoc
2020-05-11Fix clippy warningsMatthias Krüger-7/+5
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-10Unblock font loading in rustdoc.cssJubilee-0/+9
rustdoc's font loading defaults to "auto", so browsers may block render. But rustdoc's case prefers a faster TTI for scrolling, this means the strictest font-display in use should be "swap". rustdoc's fonts do provide notable legibility improvements but first-time users will have little trouble reading without. This means "optional" is preferred. The one exception is Source Serif Pro: it's a big difference for body text, so "fallback" is preferred over "optional" to cause a (tiny) block.
2020-05-10Rollup merge of #71945 - GuillaumeGomez:sort-impl-on-foreign-types-section, ↵Ralf Jung-8/+7
r=kinnison,ollie27 Sort "implementations on foreign types" section in the sidebar Fixes #71926. We were sorting by the ID instead of sorting by the name. They're not in the same order as the implementations but I think it makes more sense this way considering this is what we do for the methods as well. r? @kinnison cc @rust-lang/rustdoc
2020-05-09Sort "implementations on foreign types" section in the sidebarGuillaume Gomez-8/+7
2020-05-09End unification of exit codes in librustdocGuillaume Gomez-21/+25
2020-05-09Rollup merge of #71555 - cjgillot:nameless, r=matthewjasperRalf Jung-52/+43
Remove ast::{Ident, Name} reexports. The reexport of `Symbol` into `Name` confused me.
2020-05-08Rollup merge of #71581 - GuillaumeGomez:unify-lints-handling, r=kinnisonDylan DPC-69/+69
Unify lints handling in rustdoc This is a small cleanup. The goal is to unify a bit things to make the reading simpler. r? @kinnison cc @rust-lang/rustdoc
2020-05-08Add emoji for deprecated messagesGuillaume Gomez-1/+4
2020-05-08Clean up rustdoc source codeGuillaume Gomez-36/+33
2020-05-08Fix testsCamille GILLOT-1/+1
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-51/+42
2020-05-07Merge aliases and search-indexGuillaume Gomez-97/+110
2020-05-07Improve doc alias discoveryGuillaume Gomez-39/+61
2020-05-07Improve doc alias JS codeGuillaume Gomez-23/+50
2020-05-06Rollup merge of #71918 - GuillaumeGomez:rename-methods-section, r=Dylan-DPCDylan DPC-18/+45
Rename methods section Fixes https://github.com/rust-lang/rust/issues/70475. It renames the section [methods](https://doc.rust-lang.org/nightly/std/string/struct.String.html#methods) into "Implementations". However, I didn't not update the title in the sidebar considering that it only lists methods under (even though I updated the link of the "methods" to make it point to the "implementations" section. r? @kinnison cc @rust-lang/rustdoc