summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2020-01-17Rollup merge of #68204 - ecstatic-morse:item-kind-impl, r=oli-obkTyler Mandry-4/+4
Use named fields for `{ast,hir}::ItemKind::Impl` Currently, the widely used `ItemKind::Impl` variant is a tuple with seven fields. I want to add an eighth in #68140, which means I have to update most matches on this variant anyways. Giving a name to each field improves readability and makes future changes of this nature much simpler. This change will cause several tools to break. I will fix them once this is merged.
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-4/+4
2020-01-15formattingGuillaume Gomez-5/+3
2020-01-15Fix deref impl on type aliasGuillaume Gomez-0/+18
2020-01-08Move `is_min_const_fn` query to librustc_mir.Camille GILLOT-1/+2
The only two uses of the associated methods are in librustc_mir and librustdoc. Please tell me if there is a better choice.
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-7/+7
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-30Retire HirVec.Camille GILLOT-1/+1
2019-12-24Show value for consts in the documentationOhad Ravid-1/+10
2019-12-22Format the worldMark Rousskov-140/+117
2019-12-22Implement PrintWithSpace trait on hir::MutabilityGuillaume Gomez-1/+1
2019-12-21Remove clean::Mutability enumGuillaume Gomez-2/+2
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-1/+1
2019-11-28rustc_metadata: Merge `cstore.rs` into `creader.rs`Vadim Petrochenkov-1/+1
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-1/+1
This is done by moving some data definitions to syntax::expand.
2019-10-24Turn crate store into a resolver outputVadim Petrochenkov-2/+2
2019-10-18Rollup merge of #65535 - eddyb:sliced-predicates, r=nikomatsakisTyler Mandry-7/+7
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-7/+7
struct.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-1/+1
2019-09-26Rename `Item.node` to `Item.kind`varkor-3/+3
2019-09-25Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakisMazdak Farrokhzad-2/+2
Rustdoc render async function re-export Closes #63710 r? @nikomatsakis
2019-09-21rename is_async_fn to asyncnesscsmoe-5/+1
2019-09-19append asyncness info to functionscsmoe-2/+6
2019-09-13Unwrap Visibility fieldsMark Rousskov-2/+2
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-08-29Auto merge of #62855 - Aaron1011:feature/rustdoc-reexport-final, r=petrochenkovbors-8/+10
Improve Rustdoc's handling of procedural macros Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-8/+10
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-19Support `impl Trait` in inlined documentationShotaro Yamada-3/+6
2019-08-11Use a HashSet instead of VecMark Rousskov-5/+3
2019-08-11Remove ReentrantMutexMark Rousskov-4/+2
This drops the parking_lot dependency; the ReentrantMutex type appeared to be unused (at least, no compilation failures occurred). This is technically a possible change in behavior of its users, as lock() would wait on other threads releasing their guards, but since we didn't actually remove any threading or such in this code, it appears that we never used that behavior (the behavior change is only noticeable if the type previously was used in two threads, in a single thread ReentrantMutex is useless).
2019-08-11Remove crate_name from DocContextMark Rousskov-4/+1
tcx.crate_name is the appropriate way to retrieve the crate name.
2019-08-10Replace is_doc_reachable with is_publicMark Rousskov-3/+3
2019-07-27Use doc comments from 'pub use' statementsAaron Hill-15/+43
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.
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-9/+3
2019-06-17remove _by_hir_id if there is no NodeId counterpartljedrz-2/+2
2019-06-10syntax: Rename variants of `SyntaxExtension` for consistencyVadim Petrochenkov-1/+1
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-1/+2
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-26/+25
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-15/+15
2019-04-21Remove mutability from `Def::Static`Vadim Petrochenkov-2/+2
2019-03-31Fix invalid bounds string generation in rustdocGuillaume Gomez-5/+5
2019-03-26Rollup merge of #59004 - GuillaumeGomez:generics-handling, r=QuietMisdreavusGuillaume Gomez-3/+8
[rustdoc] Improve "in parameters" search and search more generally Fixes #58230. r? @QuietMisdreavus
2019-03-24Separate variant id and variant constructor id.David Wood-3/+1
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-21Add bounds for return types as wellGuillaume Gomez-1/+2
2019-03-21Greatly improve generics handling in rustdoc searchGuillaume Gomez-3/+7
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-19/+19
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+2
2019-02-24Auto merge of #58232 - ljedrz:HirIdification_continued, r=Zoxcbors-4/+4
HirId-ify intravisit A big step towards https://github.com/rust-lang/rust/pull/57578. This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
2019-02-23Fix tidy check errorsHirokazu Hata-2/+11