about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-01-07Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, r=alexcrichtonYuki Okushi-1/+0
Stabilise vec::remove_item Closes #40062 r? @alexcrichton
2020-01-06rustdoc: Remove more `#[doc(cfg(..))]` duplicatesOliver Middleton-16/+90
2020-01-06remove usage of feature gatedylan_DPC-1/+0
2020-01-06Fix error code failure check in rustdoc testGuillaume Gomez-2/+1
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-61/+66
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-06Rollup merge of #67897 - pickfire:patch-1, r=Dylan-DPCDylan DPC-3/+3
Use `as_deref()` to replace `as_ref().map(...)` Suggested by @lzutao
2020-01-06Auto merge of #67563 - euclio:rustdoc-buffer-lexer, r=GuillaumeGomezbors-3/+29
buffer lexer errors in rustdoc syntax checking The code isn't ideal (I really would like to display the errors inline), but this at least gets us to where we were before #63017.
2020-01-05rustdoc: HTML escape const valuesOliver Middleton-5/+16
2020-01-05Rollup merge of #67818 - ollie27:rustdoc_playground_syntax_error, ↵Dylan DPC-76/+72
r=GuillaumeGomez rustdoc: Avoid panic when parsing codeblocks for playground links `make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally. Fixes #63016 r? @GuillaumeGomez
2020-01-05Use `as_deref()` to replace `as_ref().map(...)`Ivan Tham-3/+3
Suggested by @lzutao
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-53/+58
2020-01-05simplify reexports in rustc::hirMazdak Farrokhzad-8/+8
2020-01-04buffer lexer errors in rustdoc syntax checkingAndy Russell-3/+29
2020-01-04Auto merge of #67803 - Centril:librustc_hir, r=Zoxcbors-15/+14
Extract `rustc_hir` out of `rustc` The new crate contains: ```rust pub mod def; pub mod def_id; mod hir; pub mod hir_id; pub mod itemlikevisit; pub mod pat_util; pub mod print; mod stable_hash_impls; pub use hir::*; pub use hir_id::*; pub use stable_hash_impls::HashStableContext; ``` Remains to be done in follow-up PRs: - Move `rustc::hir::map` into `rustc_hir_map` -- this has to be a separate crate due to the `dep_graph` (blocked on https://github.com/rust-lang/rust/pull/67761). - Move references to `rustc::hir` to `rustc_hir` where possible. cc https://github.com/rust-lang/rust/issues/65031 r? @Zoxc
2020-01-04Omit underscore constants from rustdocDavid Tolnay-11/+15
2020-01-04Distinguish between private items and hidden items in rustdocDavid Tolnay-73/+108
I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.
2020-01-04rustdoc: Avoid panic when parsing codeblocks for playground linksOliver Middleton-76/+72
`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.
2020-01-04Rollup merge of #67709 - petrochenkov:nodedup2, r=CentrilDylan DPC-41/+13
Introduce an option for disabling deduplication of diagnostics With the intent of using it in UI tests (https://github.com/rust-lang/rust/pull/67122). The option is boolean (`-Z deduplicate-diagnostics=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z deduplicate-diagnostics=no -Z deduplicate-diagnostics=yes` == `-Z deduplicate-diagnostics=yes`), so it can be set in a hierarchical way, e.g. UI testing infra may disable the deduplication by default with specific tests being able to enable it back.
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-4/+3
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-11/+11
2020-01-03Address review comments + Fix rebaseVadim Petrochenkov-2/+2
2020-01-03rustdoc: Respect diagnostic debugging optionsVadim Petrochenkov-41/+13
2020-01-02Normalize `syntax::edition` imports.Mazdak Farrokhzad-10/+10
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-14/+14
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-11/+12
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-40/+40
2019-12-31Rollup merge of #67735 - petrochenkov:uibool, r=Mark-SimulacrumDylan DPC-3/+3
Support `-Z ui-testing=yes/no` `ui-testing` is now a boolean option (`-Z ui-testing=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z ui-testing=yes -Z ui-testing=no` == `-Z ui-testing=no`), so it can be set in a hierarchical way, e.g. UI testing infra may enable it by default with specific tests being able to opt-out. This way we can remove the special opt-out support from `compiletest`. Inspired by https://github.com/rust-lang/rust/pull/67709.
2019-12-31Auto merge of #67032 - cjgillot:hirene, r=Zoxcbors-15/+2
Allocate HIR on an arena 4/4 This is the fourth and last PR in the series started by #66931, #66936 and #66942. The last commits should compile on their own. The difference with the previous PR is given by https://github.com/cjgillot/rust/compare/hirene-ty...hirene A few more cleanups may be necessary, please tell me. r? @eddyb like the other cc @Zoxc
2019-12-30Support `-Z ui-testing=yes/no`Vadim Petrochenkov-3/+3
2019-12-30Rename `libsyntax_ext` and `libsyntax_expand` in codeVadim Petrochenkov-2/+2
2019-12-30Make things build againVadim Petrochenkov-2/+2
2019-12-30Retire hir::ptr.Camille GILLOT-13/+0
2019-12-30Retire HirVec.Camille GILLOT-2/+2
2019-12-29Auto merge of #66942 - cjgillot:hirene-ty, r=Zoxcbors-57/+57
Allocate HIR on an arena 3/4 -- Ty This is the third PR in the series started by #66931 and #66936 Once again, commits don't really make sense on their own. They are mostly split by type of compile error. The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-expr...hirene-ty
2019-12-28doc comments: Less attribute mimickingVadim Petrochenkov-46/+21
2019-12-27Fallout in other crates.Camille GILLOT-57/+57
2019-12-27Use Arena inside hir::FnSig.Camille GILLOT-1/+1
2019-12-24Deprecate Error::description for realDavid Tolnay-5/+1
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-24x.py fmt after previous deignoreMark Rousskov-71/+162
2019-12-24Show value for consts in the documentationOhad Ravid-8/+124
2019-12-23Rollup merge of #67527 - GuillaumeGomez:results-show-too-much, r=kinnisonMazdak Farrokhzad-46/+45
Results show too much Fixes #67461. To reproduce the current issue: search anything, then once the results appears, press escape. They should disappear then re-appear right away. This is because blurring an element triggers the "change" event. r? @kinnison
2019-12-22Format the worldMark Rousskov-4822/+5186
2019-12-22Rollup merge of #67487 - GuillaumeGomez:rustdoc-mutability-removal, r=CentrilMazdak Farrokhzad-40/+23
Rustdoc mutability removal Fixes #67470. As discussed in another PR, the `clean::Mutability` type in rustdoc is useless. So let's remove it! r? @Centril
2019-12-22Rollup merge of #66877 - skinny121:const-eval-entry-points, r=oli-obkMazdak Farrokhzad-18/+2
Add simpler entry points to const eval for common usages. I found the `tcx.const_eval` API to be complex/awkward to work with, because of the inherent complexity from all of the different situations it is called from. Though it mainly used in one of the following ways: - Evaluates the value of a constant without any substitutions, e.g. evaluating a static, discriminant, etc. - Evaluates the value of a resolved instance of a constant. this happens when evaluating unevaluated constants or normalising trait constants. - Evaluates a promoted constant. This PR adds three new functions `const_eval_mono`, `const_eval_resolve`, and `const_eval_promoted` to `TyCtxt`, which each cater to one of the three ways `tcx.const_eval` is normally used.
2019-12-22Fix invalid results showing backGuillaume Gomez-0/+4
2019-12-22Improve code readabilityGuillaume Gomez-43/+37
2019-12-22Improve JS code a bit by avoid erasing all event handlersGuillaume Gomez-4/+5
2019-12-22Implement PrintWithSpace trait on hir::MutabilityGuillaume Gomez-13/+13
2019-12-22Auto merge of #66931 - cjgillot:hirene-preamble, r=eddybbors-32/+31
Allocate HIR on an arena 1/4 This PR is the first in a series of 4, aiming at allocating the HIR on an arena, as a memory optimisation. 1. This first PR lays the groundwork and migrates some low-hanging fruits. 2. The second PR will migrate `hir::Expr`, `hir::Pat` and related. 3. The third PR will migrate `hir::Ty` and related. 4. The final PR will be dedicated to eventual cleanups. In order to make the transition as gradual as possible, some lowering routines receive `Box`-allocated data and move it into the arena. This is a bit wasteful, but hopefully temporary. Nonetheless, special care should be taken to avoid double arena allocations. Work mentored by @Zoxc.
2019-12-21Use Arena inside hir::Mod.Camille GILLOT-3/+3