about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-04-06ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.Eduard-Mihai Burtescu-52/+52
2020-04-06ty: remove unnecessary `Predicate::walk_tys` and `collect_regions`.Eduard-Mihai Burtescu-19/+22
2020-04-05Stop importing int modules in librustdocLinus Färnstrand-2/+0
2020-04-03Rollup merge of #70706 - gizmondo:check-theme, r=GuillaumeGomezDylan DPC-13/+7
Minor cleanup in rustdoc --check-theme Expand and remove try_something macro. Since https://github.com/rust-lang/rust/commit/2f6226518bd5085896a0f27cfd3ea396367ecd50 there has been only one invocation. r? @GuillaumeGomez
2020-04-02Expand and remove try_something macro.Alex Aktsipetrov-13/+7
Since https://github.com/rust-lang/rust/commit/2f6226518bd5085896a0f27cfd3ea396367ecd50 there has been only one invocation.
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-2/+2
2020-04-02use direct import for ErrorReportedMazdak Farrokhzad-1/+1
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-1/+1
2020-03-31Rollup merge of #69458 - Luro02:master, r=GuillaumeGomez,ollie27Dylan DPC-40/+63
improve folder name for persistent doc tests This fixes #69411, by using the entire path as folder name and storing already visited paths in a HashMap + appending a number to the file name for duplicates.
2020-03-31more clippy fixesMatthias Krüger-115/+93
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-31improve folder name for persistent doc testsLuro02-40/+63
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-23/+23
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-38/+38
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-28Auto merge of #66938 - GuillaumeGomez:lint-for-no-crate-level-doc, r=Dylan-DPCbors-2/+22
Add lint when no doc is present at the crate-level Follow-up of #66267. r? @kinnison
2020-03-28Rollup merge of #70493 - 0xd4d:rustdoc-tab-size, r=GuillaumeGomezDylan DPC-2/+2
Fix rustdoc.css CSS tab-size property This fixes the CSS tab size property names which are called `tab-size` / `-moz-tab-size` and not `tab-width` Old issue https://github.com/rust-lang/rust/issues/49155 and related PR https://github.com/rust-lang/rust/pull/50947 tab-size: https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size
2020-03-28Rollup merge of #70448 - TimotheeGerber:rustdoc-create-output-dir, ↵Dylan DPC-1/+6
r=GuillaumeGomez Create output dir in rustdoc markdown render `rustdoc` command on a standalone markdown document fails because the output directory (which default to `doc/`) is not created, even when specified with the `--output` argument. This PR adds the creation of the output directory before the file creation to avoid an unexpected error which is unclear. I am not sure about the returned error code. I did not find a table explaining them. So I simply put the same error code that is returned when `File::create` fails because they are both related to file-system errors. Resolve #70431
2020-03-28Fix rustdoc.css CSS tab-size property0xd4d-2/+2
2020-03-27clarify hir_id <-> node_id method namesBastian Kauschke-1/+1
2020-03-26Create output dir in rustdoc markdown renderTimothée Gerber-1/+6
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-4/+5
2020-03-24Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakisMazdak Farrokhzad-1/+0
Remove `ReClosureBound` We now substitute external names for regions in the query response. r? @nikomatsakis
2020-03-23Rollup merge of #69494 - GuillaumeGomez:stabilize-crate-version, ↵Mazdak Farrokhzad-1/+1
r=ehuss,aleksator,ollie27 Stabilize --crate-version option in rustdoc I don't see any reason to not stabilize it anymore, so let's go! cc @kinnison @ehuss r? @ollie27
2020-03-23Remove `ReClosureBound`Matthew Jasper-1/+0
2020-03-23Auto merge of #69649 - estebank:negative-impl-span, r=Centrilbors-0/+1
Tweak output for invalid negative impl errors Follow up to #69722. Tweak negative impl errors emitted in the HIR: ``` error[E0192]: invalid negative impl --> $DIR/E0192.rs:9:6 | LL | impl !Trait for Foo { } | ^^^^^^ | = note: negative impls are only allowed for auto traits, like `Send` and `Sync` ```
2020-03-22Tweak output for invalid negative impl errorsEsteban Küber-0/+1
2020-03-22Rollup merge of #70254 - matthiaskrgr:cl4ppy, r=CentrilDylan DPC-7/+4
couple more clippy fixes (let_and_return, if_same_then_else) * summarize if-else-code with identical blocks (clippy::if_same_then_else) * don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
2020-03-22Update lint name to follow conventionGuillaume Gomez-3/+3
2020-03-22Update to new diagnosticGuillaume Gomez-8/+11
2020-03-22Improve code readabilityGuillaume Gomez-13/+12
2020-03-22rename NO_CRATE_LEVEL_DOC lint into MISSING_CRATE_LEVEL_DOCGuillaume Gomez-4/+3
2020-03-22Add lint when no doc is present at the crate-levelGuillaume Gomez-0/+19
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-7/+4
(clippy::let_and_return)
2020-03-21remove redundant returns (clippy::needless_return)Matthias Krüger-3/+1
2020-03-20remove redundant import (clippy::single_component_path_imports)Matthias Krüger-1/+0
remove redundant format!() call (clippy::useless_format) don't use ok() before calling expect() (clippy::ok_expect)
2020-03-19Auto merge of #69402 - GuillaumeGomez:extend-search, r=kinnisonbors-104/+213
Extend search I realized that when looking for "struct:String" in the rustdoc search for example, the "in arguments" and "returned" tabs were always empty. After some investigation, I realized it was because we only provided the name, and not the type, making it impossible to pass the "type filtering" check. To resolve this, I added the type alongside the name. Note for the future: we could improve this by instead only registering the path id and use the path dictionary directly. The only problem with that solution (which I already tested) is that it becomes complicated for types in other crates. It'd force us to handle both case with an id and a case with `(name, type)`. I found the current PR big enough to not want to provide it directly. However, I think this is definitely worth it to make it work this way in the future. About the two tests I added: they don't have much interest except checking that we actually have something returned in the search in the cases of a type filtering with and without literal search. I also had to update a bit the test script to add the new locally global (haha) variable I created (`NO_TYPE_FILTER`). I added this variable to make the code easier to read than just "-1". r? @kinnison cc @ollie27
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-1/+1
2020-03-19Rollup merge of #70005 - GuillaumeGomez:code-block-signs, r=kinnisonMazdak Farrokhzad-13/+21
[rustdoc] Improve visibility for code blocks warnings It appeared that a lot of people didn't notice when a code block was meant to fail compilation or wasn't tested at all. The changes here make the colors less transparent and the icon bigger. So before it looked like this: ![old-light](https://user-images.githubusercontent.com/3050060/76687070-f1cdbb80-6620-11ea-9b73-0c787dc671f7.png) ![old-dark](https://user-images.githubusercontent.com/3050060/76687079-f4c8ac00-6620-11ea-90fb-e548329e01b4.png) And now it looks like this: ![new-light](https://user-images.githubusercontent.com/3050060/76687092-fd20e700-6620-11ea-9ebb-2b6852f00899.png) ![new-dark](https://user-images.githubusercontent.com/3050060/76687091-fd20e700-6620-11ea-8fea-6854c8367b97.png) cc @rust-lang/rustdoc r? @kinnison
2020-03-18Rollup merge of #70075 - GuillaumeGomez:fix-repr-display, r=petrochenkovMazdak Farrokhzad-1/+0
Fix repr pretty display Fixes #70027. r? @varkor
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-27/+25
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-17Update rustdoc test and remove TODO commentGuillaume Gomez-1/+0
2020-03-16Update src/librustdoc/html/static/main.js Guillaume Gomez-1/+1
Fix variable name Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-16Rename render::Type to improve namingGuillaume Gomez-8/+8
2020-03-16formattingGuillaume Gomez-27/+24
2020-03-16Support type search for arguments and returned typesGuillaume Gomez-103/+215
2020-03-16Rollup merge of #69738 - mark-i-m:assoc-fn-2, r=eddybDylan DPC-3/+3
More Method -> AssocFn renaming r? @Centril @eddyb cc #60163 Blocked on #69674
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-27/+25
2020-03-16Rollup merge of #69686 - varkor:rustdoc-attributes, r=GuillaumeGomezDylan DPC-23/+3
Use `pprust` to print attributes in rustdoc Fixes https://github.com/rust-lang/rust/issues/69559. I'm not sure what the original motivation was for the `render_attribute`, so I may be missing something, but replacing it with `pprust::attribute_to_string` seems to give the intended output (modulo some spacing idiosyncrasies). r? @GuillaumeGomez
2020-03-15More Method->Fn renamingMark Mansi-3/+3
2020-03-15Auto merge of #68944 - Zoxc:hir-map, r=eddybbors-8/+11
Use queries for the HIR map r? @eddyb cc @michaelwoerister