about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2019-10-14Rollup merge of #65363 - Centril:less-pprust, r=Mark-SimulacrumMazdak Farrokhzad-1/+2
Remove implicit dependencies on syntax::pprust Part of https://github.com/rust-lang/rust/pull/65324. The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer. r? @estebank
2019-10-13ast: remove implicit pprust dependency via Display.Mazdak Farrokhzad-1/+2
Instead just use `pprust::path_to_string(..)` where needed. This has two benefits: a) The AST definition is now independent of printing it. (Therefore we get closer to extracting a data-crate.) b) Debugging should be easier as program flow is clearer.
2019-10-12Auto merge of #64873 - popzxc:prettify-test-time, r=wesleywiserbors-0/+1
Enhance report-time option ## Short overview This PR is a follow-up to a previously closed #64714 PR. ## Changes introduced by this PR * `libtest` now retrieves the type of the test within `TestDesc` (available types are: `UnitTest`, `IntegrationTest`, `DocTest`, `Unknown`). * `--report-time` subcommand of the `libtest` now supports colored output (disabled by default). * Colorized output depends on the threshold values. Default values (proposed by @wesleywiser): - For unit-tests: 50ms warn/100ms critical, - For integration-tests: 500ms warn/1000ms critical, - For doctests: same as for integration tests, - For unknown tests: `TEST_WARN_TIMEOUT_S` warn/ `TEST_WARN_TIMEOUT_S * 2` critical (it will only applied single-threaded mode, because otherwise test will be interrupted after reaching `TEST_WARN_TIMEOUT_S`). - These values can be overrided by setting environment variables (since those thresholds are somewhat constant for every project, it's more flexible to use environment variables than command line arguments). * New optional flag `--ensure-test-time` for `libtest`. With this flag applied, exectuion time limit excesss will cause test failure. ## What have not been done There was a comment that it would be nice to have an entry in the Cargo book about it. However, changes introduced by this PR (and #64663 in which `report-time` flag was added) aren't related directly to `cargo`, it's more about `libtest` itself. I'm considering that [The Unstable Book](https://doc.rust-lang.org/unstable-book/) is more appropriate place, but not sure if I'm right (and if so, how exactly it should be described). As one possible option, this PR may be merged without denoting it in the documentation, and in the next PR adding support of this feature to the `cargo` itself, I'll add a note in the Cargo book. ## Scope of this PR Logical scope of this PR is `libtest` only. However, to get test types, I had to modify also `libsyntax_ext` and `librustdoc` for them to provide information about test type. ## Rationale Rationale for colored output was submitted in #64714 Providing the information about kind of test was also proposed in #64714, and as an additional benefit this information may be useful for the tools using `libtest` (e.g. `cargo`). Adding flag to treat time limits excess seems logical to me, so projects that do care about test execution time won't have to invent a wheel. ## Backward compatibility All the changes are completely backward compatible. ## Demo ![rustc_enhanced_time](https://user-images.githubusercontent.com/12111581/65818381-c04f6800-e219-11e9-9875-322463abe24f.gif) r? @wesleywiser
2019-10-12Auto merge of #65190 - GuillaumeGomez:dont-pass-doctest-feature-by-default, ↵bors-4/+2
r=Mark-Simulacrum Don't pass doctest feature by default As asked in https://github.com/rust-lang/rust/pull/63803#issuecomment-539064434. r? @QuietMisdreavus
2019-10-10Don't pass doctest feature by defaultGuillaume Gomez-4/+2
2019-10-08Stabilize mem::take (mem_take)Jon Gjengset-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-07Rebase rustc-rayon on rayon-1.2Josh Stone-1/+1
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-06Rollup merge of #65155 - Avi-D-coder:fix-lints, r=Mark-SimulacrumTyler Mandry-9/+9
Use shorthand initialization in rustdoc This just fixes a few lints I rust-analyzer was showing. Is this sort of PR useful? Should the lints be fixed as apart of the otherwise unrelated PR I was working on?
2019-10-06Use shorthand initialization in rustdocAvi Dessauer-9/+9
2019-10-05Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandryTyler Mandry-1/+1
Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend" This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes. This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-05Rollup merge of #64708 - SimonSapin:option-deref, r=CentrilTyler Mandry-1/+0
Stabilize `Option::as_deref` and `Option::as_deref_mut` The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-1/+1
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichtonbors-1/+1
Upgrade Emscripten targets to use upstream LLVM backend - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-04Auto merge of #64994 - GuillaumeGomez:fix-rustdoc-display-js-disabled, ↵bors-0/+8
r=Mark-Simulacrum Fix rustdoc display with js disabled Fixes #64988. Currently, all sections are collapsed when the page is loading, and then is displayed once done. However, if js is disabled, they never get expanded. Therefore, they need to be shown by default. r? @Mark-Simulacrum
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+1
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-03Rollup merge of #64741 - GuillaumeGomez:prevent-rustdoc-feature-doctests, ↵Tyler Mandry-3/+7
r=QuietMisdreavus Prevent rustdoc feature doctests Part of https://github.com/rust-lang/rust/pull/61351 cc @ollie27
2019-10-02Rollup merge of #64948 - GuillaumeGomez:improve-sidebar-styling, ↵Mazdak Farrokhzad-4/+4
r=Mark-Simulacrum Improve sidebar styling to make its integration easier Part of https://github.com/rust-lang/docs.rs/issues/417 Setting the height was an error: forcing the element bottom to be at the bottom allows to change to top of the sidebar. r? @Mark-Simulacrum
2019-10-02Fix rustdoc display with js disabledGuillaume Gomez-0/+8
2019-10-01Prevent rustdoc feature to be passed down to doctestsGuillaume Gomez-3/+7
2019-10-01Improve sidebar styling to make its integration easierGuillaume Gomez-4/+4
2019-09-30Auto merge of #64778 - csmoe:index, r=eddybbors-1/+2
Introduce librustc_index crate Closes #50592
2019-09-29rustdoc: Fix default logo filenameOliver Middleton-1/+1
2019-09-29Enhance report-time optionIgor Aleksanov-0/+1
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+2
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-9/+14
2019-09-28rustc: don't store a lifetime in hir::TyKind::CVarArgs.Eduard-Mihai Burtescu-1/+1
2019-09-27Auto merge of #63937 - Nashenas88:rustdoc_57180, r=GuillaumeGomezbors-17/+8
Fix ICE in rustdoc when merging generic and where bounds of an Fn with an output Fixes #57180
2019-09-27Fix librustcdoc testvarkor-1/+1
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-5/+5
2019-09-26Rename `ForeignItem.node` to `ForeignItem.kind`varkor-1/+1
2019-09-26Rename `Item.node` to `Item.kind`varkor-13/+13
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-2/+2
2019-09-26Rename `TraitItem.node` to `TraitItem.kind`varkor-1/+1
2019-09-26Rename `Lit.node` to `Lit.kind`varkor-1/+1
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-1/+1
2019-09-26Rename `Pat.node` to `Pat.kind`varkor-1/+1
2019-09-26Auto merge of #64515 - varkor:kindedterm, r=oli-obkbors-9/+9
Rename `subst::Kind` to `subst::GenericArg` And `subst::UnpackedKind` to `subst::GenericArgKind`. Individual variable names (e.g. `kind`) are not renamed, which would be an infeasible mission. Fixes https://github.com/rust-lang/rust/issues/64352. r? @eddyb
2019-09-26Rename some `_sty` variables to `_kind`varkor-4/+4
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-5/+5
2019-09-26Auto merge of #62661 - arielb1:never-reserve, r=nikomatsakisbors-5/+8
reserve `impl<T> From<!> for T` this is necessary for never-type stabilization. cc #57012 #35121 I think we wanted a crater run for this @nikomatsakis? r? @nikomatsakis
2019-09-26Auto merge of #64513 - varkor:sty-begone, r=eddybbors-12/+12
Rename `TyS.sty` to `TyS.kind` Fixes https://github.com/rust-lang/rust/issues/64353. r? @eddyb
2019-09-25Rename `sty` to `kind`varkor-12/+12
2019-09-25Snap cfgs to new betaMark Rousskov-1/+0
2019-09-25Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakisMazdak Farrokhzad-3/+4
Rustdoc render async function re-export Closes #63710 r? @nikomatsakis
2019-09-24Rollup merge of #64443 - Mark-Simulacrum:rustdoc-clean-1, r=GuillaumeGomezMazdak Farrokhzad-1450/+1480
rustdoc: general cleanup Review should be conducted commit-by-commit. There are some general cleanup commits in the end, which are somewhat related but can be easily split into another PR, so just let me know.
2019-09-24resolve the rustc_reservation_impl attribute in 1 placeAriel Ben-Yehuda-5/+8
2019-09-23Stabilize Option::deref and Option::deref_mutSimon Sapin-1/+0
The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-09-23Remove needless `mut` in pathsMark Rousskov-1/+1
2019-09-23Remove unused argumentsMark Rousskov-14/+10
2019-09-23Utilize shared error codes rather than re-querying envMark Rousskov-1/+1