summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-2/+2
2020-04-10librustc_middle: return LocalDefId instead of DefId in local_def_id_from_node_idmarmeladema-1/+5
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-2/+2
2020-03-14Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPCYuki Okushi-6/+2
fix more clippy findings * reduce references on match patterns (clippy::match_ref_pats) * Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline) * libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string) * remove unneeded mutable references (cippy::unnecessary_mut_passed) * libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast) * rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) * call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref) * iterate over a maps values directly. (clippy::for_kv_map) * rustdoc: simplify boolean condition (clippy::nonminimal_bool) * Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) * rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some) * rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)
2020-03-11rustdoc: remove unused importMatthias Krüger-1/+0
2020-03-10Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnisonMazdak Farrokhzad-2/+0
Remove spotlight I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it. r? @kinnison cc @ollie27
2020-03-07rustdoc: simplify boolean condition (clippy::nonminimal_bool)Matthias Krüger-1/+1
2020-03-07Use ?-operator in more places (clippy::question_mark, had some false ↵Matthias Krüger-5/+1
negatives fixed recently)
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-27Remove "important traits" featureGuillaume Gomez-2/+0
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-2/+4
2020-02-08Make `provided_trait_methods` use `impl Iterator`Jonas Schievink-3/+1
2020-02-08Make `associated_items` query return a sliceJonas Schievink-1/+2
2020-01-26rustdoc: Fix re-exporting primitive typesOliver Middleton-4/+33
* Generate links to the primitive type docs for re-exports. * Don't ICE on cross crate primitive type re-exports. * Make primitive type re-exports show up cross crate.
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