summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-1/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-09-26add derive macros' helper attributes to doc outputQuietMisdreavus-1/+7
2018-09-25disable proc-macro re-export inliningQuietMisdreavus-7/+8
Proc-macros don't emit their attributes or source spans across crates. This means that rustdoc can't actually see the docs of a proc-macro if it wasn't defined in the active crate, and attempting to inline it creates an empty page with no docs or source link. In lieu of attempting to fix that immediately, this commit forces proc-macro re-exports to never inline, which at least creates usable links to complete documentation.
2018-09-25handle proc-macros as macros instead of functionsQuietMisdreavus-31/+34
2018-09-20shuffle ownership of `external_traits`QuietMisdreavus-4/+10
constraints: - clean/inline.rs needs this map to fill in traits when inlining - fold.rs needs this map to allow passes to fold trait items - html/render.rs needs this map to seed the Cache.traits map of all known traits The first two are the real problem, since `DocFolder` only operates on `clean::Crate` but `clean/inline.rs` only sees the `DocContext`. The introduction of early passes means that these two now exist at the same time, so they need to share ownership of the map. Even better, the use of `Crate` in a rustc thread pool means that it needs to be Sync, so it can't use `Lrc<Lock>` to manually activate thread-safety. `parking_lot` is reused from elsewhere in the tree to allow use of its `ReentrantMutex`, as the relevant parts of rustdoc are still single-threaded and this allows for easier use in that context.
2018-09-20refactor: move `access_levels` into RenderInfoQuietMisdreavus-2/+2
2018-09-20collect auto-/blanket-impls during collect-trait-implsQuietMisdreavus-21/+7
2018-09-20don't check visibility when inlining local implsQuietMisdreavus-6/+10
those get handled properly in strip-hidden anyway
2018-09-20pull impl generics from HIR if availableQuietMisdreavus-13/+19
2018-09-20collect impl items from the HIR if availableQuietMisdreavus-6/+17
2018-09-20pull local types from the HIR instead of tcxQuietMisdreavus-1/+10
2018-09-20handle local names when registering FQNsQuietMisdreavus-4/+8
2018-09-20add a bunch of debug printsQuietMisdreavus-0/+1
2018-09-20undo some tweaks to build_implQuietMisdreavus-13/+8
2018-09-20don't record an external trait if it's not externalQuietMisdreavus-0/+4
2018-09-20print local inlined consts via the HIR mapQuietMisdreavus-1/+5
2018-09-20rustdoc: collect trait impls as an early passQuietMisdreavus-73/+13
2018-09-13introduce SelfCtorF001-1/+2
2018-08-22Replace TyForeign with ForeignTyvarkor-1/+1
2018-08-22Rename Def::{Param, Foreign} to Def::{TyParam, TyForeign}varkor-1/+1
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-1/+1
2018-08-04Clean generic impls codeGuillaume Gomez-7/+19
2018-08-03Move unused trait functions to inherent functionsMark Rousskov-1/+1
2018-08-03Store concrete crate stores where possibleMark Rousskov-1/+1
2018-07-28Don't display full blanket implementation and put it into its own sectionGuillaume Gomez-0/+1
2018-07-22Add filter over non generic implsGuillaume Gomez-7/+0
2018-07-22Working generic implGuillaume Gomez-0/+6
2018-07-13don't panic when you see proc-macrosQuietMisdreavus-5/+9
2018-07-04Auto merge of #51611 - QuietMisdreavus:slippery-macros, r=ollie27bors-5/+38
rustdoc: import cross-crate macros alongside everything else The thrilling conclusion of the cross-crate macro saga in rustdoc! After https://github.com/rust-lang/rust/pull/51425 made sure we saw all the namespaces of an import (and prevented us from losing the `vec!` macro in std's documentation), here is the PR to handle cross-crate macro re-exports at the same time as everything else. This way, attributes like `#[doc(hidden)]` and `#[doc(no_inline)]` can be used to control how the documentation for these macros is seen, rather than rustdoc inlining every macro every time. Fixes https://github.com/rust-lang/rust/issues/50647
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-1/+1
Remove emulation of hygiene with gensyms
2018-06-22Fix rustdoc and remove default impl for FnHeaderTaylor Cramer-1/+1
2018-06-21Parse async fn header.Without Boats-3/+6
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20use the imported name when rendering an imported macroQuietMisdreavus-3/+3
2018-06-20Make GenericBound explicitvarkor-5/+5
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-2/+2
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-1/+1
2018-06-20Lift bounds into GenericParamvarkor-2/+2
2018-06-17rustdoc: import cross-crate macros alongside everything elseQuietMisdreavus-5/+38
2018-06-15process cross-crate glob re-exportsQuietMisdreavus-0/+17
2018-05-24Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27kennytm-0/+3
rustdoc: hide macro export statements from docs As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta. What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
2018-05-23rustdoc: hide macro export statements from docsQuietMisdreavus-0/+3
2018-05-15add auto-impl for primitive typeGuillaume Gomez-0/+8
2018-05-07Prevent infinite recursion of modulesGuillaume Gomez-8/+8
2018-04-21Add some f32 and f64 inherent methods in libcoreSimon Sapin-0/+2
… previously in the unstable core::num::Float trait. Per https://github.com/rust-lang/rust/issues/32110#issuecomment-379503183, the `abs`, `signum`, and `powi` methods are *not* included for now since they rely on LLVM intrinsics and we haven’t determined yet whether those instrinsics lower to calls to libm functions on any platform.
2018-04-21Replace StrExt with inherent str methods in libcoreSimon Sapin-0/+1
2018-04-21Replace SliceExt with inherent [T] methods in libcoreSimon Sapin-0/+1
2018-04-21Move non-allocating [u8] inherent methods to libcoreSimon Sapin-0/+1
Fixes #45803
2018-04-19Remove HIR inliningWesley Wiser-23/+1
Fixes #49690
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-2/+2