about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2018-11-10move all static-file include!s into a single moduleQuietMisdreavus-25/+25
2018-11-10Remove short doc where it starts with a codeblockGuillaume Gomez-10/+25
2018-11-05Auto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomezbors-47/+42
rustdoc: refactor: centralize all command-line argument parsing This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation. One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time. One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.
2018-11-03Rollup merge of #54162 - GuillaumeGomez:hide-default-impls-items, ↵Guillaume Gomez-25/+41
r=QuietMisdreavus Hide default impls items Follow up of #51885. Fixes #54025. cc @Mark-Simulacrum r? @QuietMisdreavus And screenshots of course: <img width="1440" alt="screen shot 2018-09-12 at 23 30 35" src="https://user-images.githubusercontent.com/3050060/45454424-1ff8d500-b6e4-11e8-9257-030322495d58.png"> <img width="1440" alt="screen shot 2018-09-12 at 23 30 42" src="https://user-images.githubusercontent.com/3050060/45454431-2424f280-b6e4-11e8-8d65-db0d85ac18f0.png">
2018-11-02pass the Options struct instead of individual argsQuietMisdreavus-49/+42
2018-11-02split off a separate RenderOptions structQuietMisdreavus-2/+2
2018-11-02swap uses of Matches with pre-parsed argsQuietMisdreavus-7/+9
2018-11-02Auto merge of #54543 - GuillaumeGomez:top-level-index, r=QuietMisdreavusbors-12/+74
Add index page argument @Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything? r? @QuietMisdreavus
2018-10-27Fix sub-variant doc displayGuillaume Gomez-9/+8
2018-10-26Rollup merge of #55358 - sinkuu:redundant_clone2, r=estebankkennytm-4/+4
Remove redundant clone (2)
2018-10-26Rollup merge of #54921 - GuillaumeGomez:line-numbers, r=QuietMisdreavuskennytm-0/+1
Add line numbers option to rustdoc Fixes #22878. r? @QuietMisdreavus
2018-10-26Remove redundant cloneShotaro Yamada-4/+4
2018-10-22Fix multiple errorsGuillaume Gomez-4/+5
2018-10-21Hide items if they use default docsGuillaume Gomez-23/+38
2018-10-21Use markdown::render instead of using pulldown_cmark directlyGuillaume Gomez-29/+21
2018-10-21Add index pageGuillaume Gomez-6/+76
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-10/+10
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-15/+15
2018-10-11Fix mobile doc displayGuillaume Gomez-2/+3
2018-10-09Add line numbers option to rustdocGuillaume Gomez-0/+1
2018-09-27show "all items" link even if crate doesn't have a versionQuietMisdreavus-4/+5
2018-09-27add attributes/derives to "all items" pageQuietMisdreavus-0/+8
2018-09-26add derive macros' helper attributes to doc outputQuietMisdreavus-0/+8
2018-09-26add declaration blocks to attribute/derive pagesQuietMisdreavus-4/+18
2018-09-25handle proc-macros as macros instead of functionsQuietMisdreavus-0/+21
2018-09-20shuffle ownership of `external_traits`QuietMisdreavus-1/+1
constraints: - clean/inline.rs needs this map to fill in traits when inlining - fold.rs needs this map to allow passes to fold trait items - html/render.rs needs this map to seed the Cache.traits map of all known traits The first two are the real problem, since `DocFolder` only operates on `clean::Crate` but `clean/inline.rs` only sees the `DocContext`. The introduction of early passes means that these two now exist at the same time, so they need to share ownership of the map. Even better, the use of `Crate` in a rustc thread pool means that it needs to be Sync, so it can't use `Lrc<Lock>` to manually activate thread-safety. `parking_lot` is reused from elsewhere in the tree to allow use of its `ReentrantMutex`, as the relevant parts of rustdoc are still single-threaded and this allows for easier use in that context.
2018-09-20refactor: move `access_levels` into RenderInfoQuietMisdreavus-2/+4
2018-09-20don't index trait impls if the trait isn't also documentedQuietMisdreavus-5/+29
2018-09-20add a bunch of debug printsQuietMisdreavus-0/+4
2018-09-18Rollup merge of #54097 - GuillaumeGomez:remove-keyword-namespace, ↵Guillaume Gomez-2/+2
r=QuietMisdreavus rustdoc: Remove namespace for keywords Fixes #54084. r? @QuietMisdreavus
2018-09-16Rollup merge of #53941 - kzys:sort-impls, r=GuillaumeGomezGuillaume Gomez-4/+20
rustdoc: Sort implementors Fixes #53812
2018-09-14Auto merge of #52962 - GuillaumeGomez:few-things, r=QuietMisdreavusbors-1/+2
Fix trait item doc setting, add new setting, start hiding elements by default and then showing them up r? @QuietMisdreavus
2018-09-12rustdoc: Sort implementorsKazuyoshi Kato-4/+20
Fixes #53812
2018-09-12Auto merge of #53409 - GuillaumeGomez:associated-const-value, r=QuietMisdreavusbors-40/+16
Don't show associated const value anymore Part of #44348. Before: <img width="1440" alt="screen shot 2018-08-16 at 00 48 30" src="https://user-images.githubusercontent.com/3050060/44177414-20ef1480-a0ee-11e8-80d4-7caf082cf0de.png"> After: <img width="1440" alt="screen shot 2018-08-16 at 00 48 23" src="https://user-images.githubusercontent.com/3050060/44177417-251b3200-a0ee-11e8-956a-4229275e3342.png"> cc @nox r? @QuietMisdreavus
2018-09-10Remove namespace for keywordsGuillaume Gomez-2/+2
2018-09-09rustdoc: Remove generated blanket impls from trait pagesOliver Middleton-14/+12
2018-09-06Don't show default docsGuillaume Gomez-16/+11
2018-09-06Fix hover on implsGuillaume Gomez-28/+28
2018-09-01Rollup merge of #53801 - GuillaumeGomez:duplicated-foreign-type-impls, ↵kennytm-5/+9
r=QuietMisdreavus Prevent duplicated impl on foreign types Fixes #53689. r? @QuietMisdreavus
2018-08-31Auto merge of #51384 - QuietMisdreavus:extern-version, r=GuillaumeGomezbors-2/+14
rustdoc: add flag to control the html_root_url of dependencies The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows: Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired. Fixes https://github.com/rust-lang/rust/issues/19603
2018-08-29Prevent duplicated impl on foreign typesGuillaume Gomez-5/+9
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-28/+29
2018-08-26Remove static and const initialization from documentationGuillaume Gomez-17/+4
2018-08-25Don't show associated const value anymoreGuillaume Gomez-23/+12
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-4/+4
or "".into()
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-4/+4
2018-08-05Change rustdoc style so fully qualified names do not overlap src linksMike Boutin-30/+30
A type's fully qualified name will now wrap once it gets to the `[-][src]` link aligned against the right edge of the content area. Previously the two would overlap and the name would only wrap when hitting the edge of the content area. The `[-][src]` link will main at the top of the header.