about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2019-11-03Auto merge of #65780 - GuillaumeGomez:move-help-popup-generation-code, ↵bors-57/+49
r=Mark-Simulacrum Move help popup generation code The first commit is just a small cleanup. The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead. r? @kinnison
2019-10-31rustdoc: Resolve module-level doc references more locallyDaniel Silverstone-4/+21
Module level docs should resolve intra-doc links as locally as possible. As such, this commit alters the heuristic for finding intra-doc links such that we attempt to resolve names mentioned in *inner* documentation comments within the (sub-)module rather that from the context of its parent. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-10-29Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPCTyler Mandry-3/+7
Prevent help popup to disappear when clicking on it Fixes #65736. r? @kinnison
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-7/+7
This is done by moving some data definitions to syntax::expand.
2019-10-27reduce size of generated HTML files by moving the popup helper code to the JSGuillaume Gomez-55/+47
2019-10-27Cleanup search element getterGuillaume Gomez-2/+2
2019-10-26Auto merge of #65167 - hermitcore:rusty-hermit, r=alexcrichtonbors-0/+1
Redesign the interface to the unikernel HermitCore We are developing the unikernel HermitCore, where the kernel is written in Rust and is already part of the Rust Standard Library. The interface between the standard library and the kernel based on a small C library. With this pull request, we remove completely the dependency to C and use lld as linker. Currently, the kernel will be linked to the application as static library, which is published at https://github.com/hermitcore/libhermit-rs. We don’t longer support the C interface to the kernel. Consequently, we remove this part from the Rust Standard Library.
2019-10-26Add more information on searchGuillaume Gomez-0/+8
2019-10-25Improve help popup detectionGuillaume Gomez-3/+4
2019-10-25Rollup merge of #65789 - Centril:with-desugared-doc, r=davidtwcoMazdak Farrokhzad-2/+26
move Attribute::with_desugared_doc to librustdoc From https://github.com/rust-lang/rust/pull/65324. r? @varkor
2019-10-25Rollup merge of #65740 - GuillaumeGomez:fix-disable-shortcut-feature, ↵Mazdak Farrokhzad-1/+1
r=Dylan-DPC Fix default "disable-shortcuts" feature value Follow-up of https://github.com/rust-lang/rust/pull/65656 It fixes the bad handling of the default value of the feature (which would disable shortcut by default, which is bad!). r? @Dylan-DPC cc @kinnison
2019-10-25with_desugared_doc: correctly refer to `attr` instead of `self`Mazdak Farrokhzad-2/+2
Co-Authored-By: David Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL@david.davidtw.co>
2019-10-25Merge branch 'master' into rusty-hermit, resolve conflictsStefan Lankes-25/+15
2019-10-25move Attribute::with_desugared_doc to librustdocMazdak Farrokhzad-2/+26
2019-10-24Prevent help popup to disappear when clicking on itGuillaume Gomez-2/+5
2019-10-24Turn crate store into a resolver outputVadim Petrochenkov-8/+3
2019-10-24resolve: Privatize all resolver fieldsVadim Petrochenkov-2/+2
2019-10-24Fix default "disable-shortcuts" feature valueGuillaume Gomez-1/+1
2019-10-23Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddybMazdak Farrokhzad-9/+1
Remove `InternedString` This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places. r? @eddyb
2019-10-23Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakisMazdak Farrokhzad-4/+5
Lockless LintStore This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence. The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes: * We no longer implicitly register lints when registering lint passes * For the most part this means that registration calls now likely want to call something like: `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`. * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints. * Lint passes still have a list of associated lints, but a followup PR could plausibly change that * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before. * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected). * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-23Rollup merge of #65706 - popzxc:add-missing-space, r=Mark-SimulacrumYuki Okushi-1/+1
Add missing space in librustdoc It just hurts my eyes... r? @Centril
2019-10-23Rollup merge of #65656 - GuillaumeGomez:option-disable-shortcut, r=Dylan-DPCYuki Okushi-1/+3
Add option to disable keyboard shortcuts in docs Fixes #65211. r? @Manishearth
2019-10-22Add missing space in librustdocIgor Aleksanov-1/+1
2019-10-22Merge branch 'master' into rusty-hermitStefan Lankes-6/+12
2019-10-21Rollup merge of #65647 - nnethercote:rm-unnecessary-traits, r=CentrilMazdak Farrokhzad-4/+3
Remove unnecessary trait bounds and derivations This PR removes unnecessary trait bounds and derivations from many types. r? @nikomatsakis
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-4/+3
2019-10-21Add option to disable keyboard shortcuts in docsGuillaume Gomez-1/+3
2019-10-21Remove unnecessary `impl Clean<String> for InternedString`.Nicholas Nethercote-8/+0
2019-10-21Convert some `InternedString`s to `Symbols`.Nicholas Nethercote-1/+1
This avoids the needs for various conversions, and makes the code slightly faster, because `Symbol` comparisons and hashing is faster.
2019-10-21Rollup merge of #65314 - tmiasko:rustdoc-z, r=ollie27Mazdak Farrokhzad-0/+7
rustdoc: forward -Z options to rustc Currently rustdoc does not forward `-Z` options to rustc when building test executables. This makes impossible to use rustdoc to run test samples when crate under test is instrumented with one of sanitizers `-Zsanitizer=...`, since the final linking step will not include sanitizer runtime library. Forward `-Z` options to rustc to solve the issue. Helps with #43031.
2019-10-20Merge branch 'master' into rusty-hermitStefan Lankes-44/+43
2019-10-19move parse_cfgspecs to rustc_interfaceMazdak Farrokhzad-2/+2
2019-10-18Rollup merge of #65535 - eddyb:sliced-predicates, r=nikomatsakisTyler Mandry-14/+13
rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole struct. While rebasing #59789 I noticed we can do this now. However, it doesn't help much without changing `inferred_outlives_of` to the same type, which I might try next.
2019-10-18rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole ↵Eduard-Mihai Burtescu-14/+13
struct.
2019-10-17Update API to be more compatible with plugin needsMark Rousskov-0/+2
Move to using Box<dyn Fn() -> ...> so that we can let plugins register state. This also adds a callback that'll get called from plugin registration so that Clippy and other tools can register lints without using the plugin API. The plugin API still works, but this new API is more compatible with drivers other than rustc.
2019-10-17Make get_lints be a static functionMark Rousskov-4/+3
This moves from calling get_lints on instantiated pass objects to the raw object
2019-10-17Rollup merge of #65465 - Centril:split-syntax-1, r=petrochenkovMazdak Farrokhzad-8/+9
Move syntax::ext to a syntax_expand and refactor some attribute logic Part of https://github.com/rust-lang/rust/pull/65324. r? @petrochenkov
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+1
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-8/+9
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-5/+6
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-11rustdoc: forward -Z options to rustcTomasz Miąsko-0/+7
Currently rustdoc does not forward `-Z` options to rustc when building test executables. This makes impossible to use rustdoc to run test samples when crate under test is instrumented with one of sanitizers `-Zsanitizer=...`, since the final linking step will not include sanitizer runtime library. Forward `-Z` options to rustc to solve the issue. Helps with #43031.
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-06redesign of the interface to the unikernel HermitCoreStefan Lankes-0/+1
- the old interface between HermitCore and the Rust Standard Library based on a small C library (newlib) - remove this interface and call directly the unikernel - remove the dependency to the HermitCore linker - use rust-lld as linker