summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2019-07-01Revert "implicit `Option`-returning doctests"Guillaume Gomez-6/+1
This reverts commit 6bb6c001be34d0932a014df981ee18f165c43374.
2019-06-30Rollup merge of #62224 - euclio:remove-derives, r=GuillaumeGomezMazdak Farrokhzad-68/+56
rustdoc: remove unused derives and variants Though many structs in rustdoc derive `RustcEncodable` and `RustcDecodable`, the impls do not appear to be used by the crate or its dependents. Removing them revealed some enum variants that are never constructed, too. r? @GuillaumeGomez
2019-06-30Auto merge of #61459 - GuillaumeGomez:fix-rustdoc-sysroot-panic, ↵bors-4/+2
r=ollie27,bjorn3,QuietMisdreavus Prevent panic when sysroot cannot be computed Fixes #61377. cc @rotty @rust-lang/rustdoc r? @Manishearth
2019-06-29Rollup merge of #61199 - ollie27:rustdoc_cfg_test, r=QuietMisdreavusMazdak Farrokhzad-3/+0
Revert "Set test flag when rustdoc is running with --test option" Reverts https://github.com/rust-lang/rust/pull/59940. It caused doctests in this repository to no longer be tested including all of the core crate.
2019-06-26remove unused derives and variantsAndy Russell-68/+56
2019-06-25Rollup merge of #62055 - matthewjasper:fix-error-counting, r=pnkfelixMazdak Farrokhzad-1/+1
Fix error counting Count duplicate errors for `track_errors` and other error counting checks. Add FIXMEs to make it clear that we should be moving away from this kind of logic. Closes #61663
2019-06-25rustc: produce AST instead of HIR from `hir::lowering::Resolver` methods.Eduard-Mihai Burtescu-9/+11
2019-06-22Prefer to use `has_errors` to `err_count`Matthew Jasper-1/+1
2019-06-22Rollup merge of #61984 - ljedrz:more_node_id_pruning, r=ZoxcMazdak Farrokhzad-2/+2
More NodeId pruning Just another round of the `HirId`ification initiative. r? @Zoxc
2019-06-22Rollup merge of #61181 - GuillaumeGomez:fix-theme-checker, r=kinnisonMazdak Farrokhzad-7/+21
Fix theme-checker failure Fixes #61145. I didn't find a way to check it without strongly depending on the output... Is there a way to check if a program fails without checking its output? r? @QuietMisdreavus
2019-06-21Better handling of the sender channel part in rustdoc file writingGuillaume Gomez-8/+8
2019-06-21Handle fs errors through errors::Handler instead of eprintln and panicGuillaume Gomez-12/+65
2019-06-21Add DocFS layer to rustdocRobert Collins-136/+231
* Move fs::create_dir_all calls into DocFS to provide a clean extension point if async extension there is needed. * Convert callsites of create_dir_all to ensure_dir to reduce syscalls. * Convert fs::write usage to DocFS.write (which also removes a lot of try_err! usage for easier reading) * Convert File::create calls to use Vec buffers and then DocFS.write in order to consistently reduce syscalls as well, make deferring to threads cleaner and avoid leaving dangling content if writing to existing files.... * Convert OpenOptions usage similarly - I could find no discussion on the use of create_new for that one output file vs all the other files render creates, if link redirection attacks are a concern DocFS will provide a good central point to introduce systematic create_new usage. (fs::write/File::create is vulnerable to link redirection attacks). * DocFS::write defers to rayon for IO on Windows producing a modest speedup: before this patch on my development workstation: $ time cargo +mystg1 doc -p winapi:0.3.7 Documenting winapi v0.3.7 Finished dev [unoptimized + debuginfo] target(s) in 6m 11s real 6m11.734s Afterwards: $ time cargo +mystg1 doc -p winapi:0.3.7 Compiling winapi v0.3.7 Documenting winapi v0.3.7 Finished dev [unoptimized + debuginfo] target(s) in 49.53s real 0m49.643s I haven't measured how much time is in the compilation logic vs in the IO and outputting etc, but this takes it from frustating to tolerable for me, at least for now.
2019-06-20Improve theme checker by removing unneeded conditionsGuillaume Gomez-6/+14
2019-06-20Add test for empty css file checkGuillaume Gomez-0/+6
2019-06-20Fix theme-checker failureGuillaume Gomez-1/+1
2019-06-20rustdoc: generate implementors for all auto traitsSimonas Kazlauskas-80/+9
Previously we would only generate a list of synthetic implementations for two well known traits – Send and Sync. With this patch all the auto traits known to rustc are considered. This includes such traits like Unpin and user’s own traits. Sadly the implementation still iterates through the list of crate items and checks them against the traits, which for non-std crates containing their own auto-traits will still not include types defined in std/core. It is an improvement nontheless.
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-20rename hir::map::name_by_hir_id to ::nameljedrz-1/+1
2019-06-19rustc: disallow cloning HIR nodes.Eduard-Mihai Burtescu-267/+271
2019-06-19rustc: replace `GenericArgs::with_generic_args` hack with a plain getter.Eduard-Mihai Burtescu-3/+4
2019-06-19Rollup merge of #61898 - petrochenkov:sekind, r=eddybMazdak Farrokhzad-11/+5
syntax: Factor out common fields from `SyntaxExtension` variants And some other related cleanups. Continuation of https://github.com/rust-lang/rust/pull/61606. This will also help to unblock https://github.com/rust-lang/rust/pull/61877.
2019-06-19Rollup merge of #61505 - ebarnard:doc-shrink, r=GuillaumeGomezMazdak Farrokhzad-8/+13
Only show methods that appear in `impl` blocks in the Implementors sections of trait doc pages In the "Implementors" and "Implementations on Foreign Types" sections, only show methods that appear in the `impl` block for that type. This has the benefit of - Reducing the size of the Iterator page, and other large trait documentation pages. - Retaining documentation on the `impl` blocks and functions in the `impl` blocks. - Indicating which provided methods are overridden. - Making the documentation match the structure of the code being documented. - Being a small change that can be easily backed out if issues arise. A set of Rust stdlib docs build with this change are [available here](https://ebarnard.github.io/2019-06-03-rust-smaller-trait-implementers-docs/). The size of the [`Iterator` doc page](https://ebarnard.github.io/2019-06-03-rust-smaller-trait-implementers-docs/std/iter/trait.Iterator.html) is reduced from 14.4MB (latest nightly) to 724kB. Before: <img width="1411" alt="Screenshot 2019-06-03 at 23 12 17" src="https://user-images.githubusercontent.com/1059683/58837971-1722a780-8655-11e9-8d81-51e48130951d.png"> After: <img width="1428" alt="Screenshot 2019-06-03 at 16 41 27" src="https://user-images.githubusercontent.com/1059683/58814907-84ffac80-861e-11e9-8692-79be473a5299.png"> cc #55900
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-2/+2
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-11/+5
2019-06-17remove _by_hir_id if there is no NodeId counterpartljedrz-12/+12
2019-06-16Fix tidyVadim Petrochenkov-16/+21
2019-06-16Separate librustcdoc modulechansuke-510/+507
2019-06-15Remove unnecessary `.clone()`Shotaro Yamada-2/+2
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-15/+15
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-8/+8
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-5/+5
2019-06-12Rollup merge of #61568 - Mark-Simulacrum:symbol-fmt-macros, r=estebankMazdak Farrokhzad-5/+5
Use Symbol, Span in libfmt_macros I'm not super happy with this, personally, but I think it might be a decent start -- happy to take suggestions as to how to expand this or change things further. r? @estebank Fixes #60795
2019-06-11Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centrilbors-2/+2
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
2019-06-11rustdoc: deny(unused_lifetimes).Eduard-Mihai Burtescu-7/+8
2019-06-10syntax: Rename variants of `SyntaxExtension` for consistencyVadim Petrochenkov-2/+2
2019-06-10syntax: Remove `SyntaxExtension::DeclMacro`Vadim Petrochenkov-1/+1
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
2019-06-10Prevent panic when sysroot cannot be computedGuillaume Gomez-4/+2
2019-06-09Introduce InnerSpan abstractionMark Rousskov-5/+5
This should be used when trying to get at subsets of a larger span, especially when the larger span is not available in the code attempting to work with those subsets (especially common in the fmt_macros crate). This is usually a good replacement for (BytePos, BytePos) and (usize, usize) tuples. This commit also removes from_inner_byte_pos, since it took usize arguments, which is error prone.
2019-06-08syntax: Move most of the `TokenKind` methods to `Token`Vadim Petrochenkov-1/+1
2019-06-08Revert "Set test flag when rustdoc is running with --test option"Oliver Middleton-3/+0
This reverts commit 8ed2292dbe75b9b65e9fe1a079428d1e1e3b610f. It caused doctests in this repository to no longer be tested including all of the core crate.
2019-06-07Rollup merge of #61605 - GuillaumeGomez:const-generic-display, r=varkorMazdak Farrokhzad-1/+4
Fix slice const generic length display Fixes #61487. r? @varkor
2019-06-07Fix slice const generic length displayGuillaume Gomez-1/+4
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-2/+2
2019-06-06syntax: Use `Token` in `StringReader` and `TokenTreesReader`Vadim Petrochenkov-5/+5
2019-06-06syntax: Use `Token` in `TokenTree::Token`Vadim Petrochenkov-2/+2
2019-06-06syntax: Rename `TokenAndSpan` into `Token`Vadim Petrochenkov-18/+18
2019-06-05Addressed points raised in review.Niko Matsakis-17/+72
2019-06-05Addressed points raised in review.Alexander Regueiro-1/+1