about summary refs log tree commit diff
path: root/src/librustdoc/passes
AgeCommit message (Collapse)AuthorLines
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-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-11/+11
2020-01-04buffer lexer errors in rustdoc syntax checkingAndy Russell-3/+29
2020-01-04Distinguish between private items and hidden items in rustdocDavid Tolnay-47/+62
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-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-4/+3
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-4/+4
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-4/+4
2019-12-30Rename `libsyntax_ext` and `libsyntax_expand` in codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-297/+328
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-1/+1
2019-11-27Use new ErrorKind enumGuillaume Gomez-10/+16
2019-11-27Replace Iterator::find calls with Iterator::any when betterGuillaume Gomez-6/+5
2019-11-27Add support for intra-doc link fields of enum variantGuillaume Gomez-7/+60
2019-11-27little intra-doc code cleanupGuillaume Gomez-16/+11
2019-11-27Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links, ↵bors-78/+211
r=kinnison Support anchors intra doc links Fixes #62833 Part of #43466. cc @ollie27 r? @kinnison
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-3/+3
Various tweaks to diagnostic output
2019-11-25Update error messagesGuillaume Gomez-3/+3
2019-11-24Fix some rustdoc error capitalizationEsteban Küber-3/+3
2019-11-23Handle anchor errorsGuillaume Gomez-113/+190
2019-11-23Handle anchors in intra doc linksGuillaume Gomez-11/+67
2019-11-20Delete ProcessCfgModMark Rousskov-2/+1
The previous commit removes the use of this, and now we cleanup.
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-1/+1
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-1/+2
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
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-24resolve: Privatize all resolver fieldsVadim Petrochenkov-2/+2
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-1/+1
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-1/+2
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-09-13Unwrap Visibility fieldsMark Rousskov-3/+3
There's not really any reason to not have the visibility default to inherited, and this saves us the trouble of checking everywhere for whether we have a visibility or not.
2019-09-13Move to print functions on types instead of impl fmt::DisplayMark Rousskov-7/+8
This will eventually allow us to easily pass in more parameters to the functions without TLS or other such hacks
2019-09-10Auto merge of #60387 - Goirad:test-expansion, r=ollie27bors-1/+1
Allow cross-compiling doctests This PR allows doctest to receive a --runtool argument, as well as possibly many --runtool-arg arguments, which are then used to run cross compiled doctests. Also, functionality has been added to rustdoc to allow it to skip testing doctests on a per-target basis, in the same way that compiletest does it. For example, tagging the doctest with "ignore-sgx" disables testing on any targets that contain "sgx". A plain "ignore" still skips testing on all targets. See [here](https://github.com/rust-lang/cargo/pull/6892) for the companion PR in the cargo project that extends functionality in Cargo so that it passes the appropriate parameters to rustdoc when cross compiling and testing doctests. Part of [#6460](https://github.com/rust-lang/cargo/issues/6460)
2019-09-07Add "bool" lang itemvarkor-0/+2
2019-09-05Rollup merge of #63930 - estebank:rustdoc-ice, r=GuillaumeGomezMazdak Farrokhzad-13/+14
Account for doc comments coming from proc macros without spans Fix https://github.com/rust-lang/rust/issues/63821.
2019-09-03added feature gate enable-per-target-ignoresDario Gonzalez-1/+1
updated and augmented tests in html/markdown.rs
2019-08-26Account for doc comments coming from proc macros without spansEsteban Küber-13/+14
2019-08-19librustdoc: warn on empty doc testTom Milligan-10/+27
2019-08-15resolve: `ParentScope::default` -> `ParentScope::module`Vadim Petrochenkov-1/+1
2019-08-15resolve: Add `ParentScope::default`, eliminate `dummy_parent_scope`Vadim Petrochenkov-1/+2
Remove some unnecessary parameters from functions
2019-08-11Don't store all traits in DocContextMark Rousskov-2/+2
This is already a query so we're just needlessly copying the data around.
2019-08-11Store typed PassesMark Rousskov-30/+33
2019-08-10Auto merge of #62955 - Mark-Simulacrum:rustdoc-clean-1, r=eddybbors-2/+2
rustdoc: general cleanups This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.
2019-08-10Replace is_doc_reachable with is_publicMark Rousskov-2/+2
2019-08-10Fix calls to resolver from rustdoc and HIR loweringVadim Petrochenkov-13/+8
Cleanup some surrounding code. Support resolution of intra doc links in unnamed block scopes. (Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.) Fix one test hitting file path limits on Windows.
2019-08-06Rollup merge of #63286 - Mark-Simulacrum:resolve-no-cb, r=petrochenkovMazdak Farrokhzad-0/+7
Replace error callback with Result r? @petrochenkov
2019-08-05Force callers of resolve_ast_path to deal with Res::Err correctlyMark Rousskov-0/+7
2019-08-05adapt rustdoc to infailable lexerAleksey Kladov-23/+9
2019-08-04Auto merge of #63048 - Aaron1011:feature/rustdoc-reexport-doc, r=GuillaumeGomezbors-3/+3
Use doc comments from 'pub use' statements Split off from #62855 Currently, rustdoc ignores any doc comments found on 'pub use' statements. As described in issue #58700, this makes it impossible to properly document procedural macros. Any doc comments must be written on the procedural macro definition, which must occur in a dedicated proc-macro crate. This means that any doc comments or doc tests cannot reference items defined in re-exporting crate, despite the fact that such items may be required to use the procedural macro. To solve this issue, this commit allows doc comments to be written on 'pub use' statements. For consistency, this applies to *all* 'pub use' statements, not just those importing procedural macros. When inlining documentation, documentation on 'pub use' statements will be prepended to the documentation of the inlined item. For example, the following items: ```rust mod other_mod { /// Doc comment from definition pub struct MyStruct; } /// Doc comment from 'pub use' /// pub use other_mod::MyStruct; ``` will caues the documentation for the re-export of 'MyStruct' to be rendered as: ``` Doc comment from 'pub use' Doc comment from definition ``` Note the empty line in the 'pub use' doc comments - because doc comments are concatenated as-is, this ensure that the doc comments on the definition start on a new line.