about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-05-02Rollup merge of #71787 - tshepang:rustdoc-warnings, r=varkorDylan DPC-3/+3
fix rustdoc warnings
2020-05-02cleanup: `config::CrateType` -> `CrateType`Vadim Petrochenkov-16/+11
2020-05-02fix rustdoc warningsTshepang Lekhonkhobe-3/+3
2020-04-26Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddybDylan DPC-14/+8
Add all remaining `DefKind`s. r? @eddyb or @Centril ~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~ ~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
2020-04-25Rollup merge of #71544 - cuviper:filter_map_next, r=Mark-SimulacrumDylan DPC-27/+16
Replace filter_map().next() calls with find_map() These are semantically the same, but `find_map()` is more concise.
2020-04-24Replace filter_map().next() calls with find_map()Josh Stone-27/+16
These are semantically the same, but `find_map()` is more concise.
2020-04-24Avoid unused Option::map resultsJosh Stone-7/+8
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2020-04-24Remove `Option` from the return type of `def_kind`.Eduard-Mihai Burtescu-14/+8
2020-04-23Fix librustdoc error due to `as_local_hir_id` changesmarmeladema-2/+2
2020-04-23Address comments from reviewmarmeladema-16/+13
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-22/+18
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-27/+32
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-45/+49
2020-04-23Update LangString::parse usage in markdown testsGuillaume Gomez-1/+1
2020-04-23Create new rustdoc lint to check for code blocks tagsGuillaume Gomez-25/+207
2020-04-20Rollup merge of #71250 - GuillaumeGomez:use-json-instead-of-js, r=kinnisonDylan DPC-5/+41
Replace big JS dict with JSON parsing Part of #56545. @ollie27 suggested that using JSON instead of a JS dict might be faster, so I decided to test it. And the results far exceeded whatever expectations I had... I used https://github.com/adamgreig/stm32ral for my tests. If you want to build it locally: ```bash $ cargo doc --features doc --open ``` But I strongly recommend to do it with this PR. Some numbers: * Loading a page with the JSON search-index: less than 1 second * Loading a page with the JS search-index: crashed after 30 seconds I think the results are clear enough... r? @ollie27 cc @rust-lang/rustdoc
2020-04-19Replace uses of `parse_opt_*` with `parse_*` where possible.Nicholas Nethercote-2/+2
This lets us specify the default at the options declaration point, instead of using `.unwrap(default)` or `None | Some(default)` at some use point far away. It also makes the code more concise.
2020-04-17Replace big JS dict with JSON parsingGuillaume Gomez-5/+41
2020-04-16Rollup merge of #71221 - cuviper:rustdoc_or_patterns, r=Mark-SimulacrumDylan DPC-30/+33
Dogfood or_patterns in rustdoc We can start using `or_patterns` in `rustdoc` as a step toward stabilization. cc #54883 @Centril
2020-04-16Dogfood or_patterns in rustdocJosh Stone-30/+33
2020-04-16Rollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPCDylan DPC-6/+6
fix more clippy warnings
2020-04-16Rollup merge of #71145 - pfmooney:illumos-triple, r=nagisaDylan DPC-0/+1
Add illumos triple This fixes rust-lang/rust#55553 and adds support for `illumos` as a `target_os` on `x86_64`. In addition to the compile spec and libstd additions, several library dependencies have been bumped in order to permit working builds of cargo and rustup for the new target. Work originally started by @jasonbking, with subsequent additions by @pfmooney and @jclulow.
2020-04-16Rollup merge of #70990 - GuillaumeGomez:rustdoc-cleanup, r=ollie27Dylan DPC-29/+25
Improve rustdoc source code a bit Very small clean up. I realized that there were too many nested conditions whereas we could just use `and_then`. r? @kinnison cc @ollie27
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-4/+4
2020-04-15Fix clippy warningsMatthias Krüger-2/+2
clippy::{filter_next,single_char_pattern,unit_arg,identity_conversion,nonminimal_bool}
2020-04-15Rollup merge of #71116 - marmeladema:dummy-hir-id-removal, r=eddybMazdak Farrokhzad-15/+9
Entirely remove `DUMMY_HIR_ID` Some helpers functions have been introduced to deal with (buggy) cases where either a `NodeId` or a `DefId` do not have a corresponding `HirId`. Those cases are tracked in issue #71104.
2020-04-14Rollup merge of #71082 - NeoRaider:ptr_slice_len, r=oli-obk,SimonSapinDylan DPC-0/+2
ptr: introduce len() method on raw slices It is already possible to extract the pointer part of a raw slice by a simple cast, but retrieving the length is not possible without relying on the representation of the raw slice when it is not valid to convert the raw slice into a slice reference (i.e. the pointer is null or unaligned). ~Introduce a new function ptr::slice_len() to add this missing feature.~ Introduce a len() method on raw slices to add this missing feature.
2020-04-14Rollup merge of #71002 - Freax13:fix-target, r=ollie27Dylan DPC-2/+7
fix target & runtool args order - `TargetTripple::to_string` converts "path triples" to `<target>-<hash>`, but in this case we need the path. Afaict there is no method to get the real triple other than manually matching - the order of the runtools arguments is inconsistent with the way tests usually pass arguments ie using `runner` key in `.cargo/config`
2020-04-14Add illumos triplePatrick Mooney-0/+1
Co-Authored-By: Jason King <jason.brian.king@gmail.com> Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14rustdoc: add "const_slice_ptr" and "mut_slice_ptr" trait implsMatthias Schiffer-0/+2
2020-04-14Remove `DUMMY_HIR_ID`marmeladema-15/+9
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-13/+14
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13Rollup merge of #70656 - GuillaumeGomez:scrollbar-display, r=kinnisonDylan DPC-0/+64
Improve scrollbar display in rustdoc The scrollbar of the left sidebar in rustdoc looks very bad on firefox (on dark theme). This PR improves it: <div style="display:inline-block;"> <div style="width:50%;display:inline-block;float:left;"> <image src="https://user-images.githubusercontent.com/3050060/78148412-202b0380-7435-11ea-8ff3-79f02ea8f9ed.png"> </div> <div style="width:50%;display:inline-block;float:left;"> <image src="https://user-images.githubusercontent.com/3050060/78148437-28833e80-7435-11ea-946b-a6fc9320b705.png"> </div> </div> With light theme: ![old-firefox-light](https://user-images.githubusercontent.com/3050060/78148718-7bf58c80-7435-11ea-93d3-2a2cafd5c6ae.png) ![firefox-light](https://user-images.githubusercontent.com/3050060/78148736-7f891380-7435-11ea-8b10-a8898f73b4c9.png) And on chrome: ![chrome-light](https://user-images.githubusercontent.com/3050060/78148903-ac3d2b00-7435-11ea-9a10-6c0376a675c3.png) ![chrome-dark](https://user-images.githubusercontent.com/3050060/78148907-ae9f8500-7435-11ea-9b89-0397b977753c.png) Small extra question: should I extend it to all scrollbars? I think it'd be better but just in case... r? @kinnison
2020-04-12Rollup merge of #71029 - Mark-Simulacrum:cargo-build, r=Mark-SimulacrumDylan DPC-1/+2
Partial work on building with Cargo This cherry picks the commits I'm directly approving from #70999, I want to land them so that that PR is smaller.
2020-04-11Depend on getopts from crates.ioLuca Barbieri-1/+2
rustc_session exports it for other crates to avoid mismatching crate versions.
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-17/+10
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-10fix target & runtool args orderTom Dohrmann-2/+7
2020-04-10Improve rustdoc source code a bitGuillaume Gomez-29/+25
2020-04-10librustc_middle: return LocalDefId instead of DefId in local_def_id_from_node_idmarmeladema-3/+7
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-1/+4
2020-04-10librustc_middle: return LocalDefId instead of DefId in opt_local_def_idmarmeladema-2/+5
2020-04-08Rollup merge of #70828 - ollie27:rustdoc_external_macro_src, r=eddybDylan DPC-6/+10
rustdoc: Don't try to load source files from external crates Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead. Part of #70757 r? @GuillaumeGomez cc @eddyb
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-6/+10
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-04-07Extend sidebar scrollbar changes to all scrollbarsGuillaume Gomez-13/+41
2020-04-07Improve scrollbar display in rustdocGuillaume Gomez-0/+36
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-05Retire rustc::ty::Attributes enum.Camille GILLOT-14/+6
2020-04-05Allocate query Vecs on the arena.Camille GILLOT-3/+4
2020-04-05Stop importing int modules in librustdocLinus Färnstrand-2/+0