summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2017-12-18Fix ?Sized where bound not being displayed at the correct placeGuillaume Gomez-2/+1
2017-12-13Auto merge of #46419 - jseyfried:all_imports_in_metadata, r=nrcbors-1/+1
Record all imports (`use`, `extern crate`) in the crate metadata This PR adds non-`pub` `use` and `extern crate` imports in the crate metadata since hygienic macros invoked in other crates may use them. We already include all other non-`pub` items in the crate metadata. This improves import suggestions in some cases. Fixes #42337. r? @nrc
2017-12-09rustdoc: Include `impl [u8]` in the docsOliver Middleton-0/+1
2017-12-05Add field `is_import` to `def::Export`.Jeffrey Seyfried-1/+1
2017-11-29rustdoc: Fix issues with cross-crate inlined associated itemsOliver Middleton-68/+4
* Visibility was missing from impl items. * Attributes and docs were missing from consts and types in impls. * Const default values were missing from traits. This unifies the code that handles associated items from impls and traits.
2017-11-21Auto merge of #45039 - QuietMisdreavus:doc-spotlight, ↵bors-0/+2
r=GuillaumeGomez,QuietMisdreavus show in docs whether the return type of a function impls Iterator/Read/Write Closes #25928 This PR makes it so that when rustdoc documents a function, it checks the return type to see whether it implements a handful of specific traits. If so, it will print the impl and any associated types. Rather than doing this via a whitelist within rustdoc, i chose to do this by a new `#[doc]` attribute parameter, so things like `Future` could tap into this if desired. ### Known shortcomings ~~The printing of impls currently uses the `where` class over the whole thing to shrink the font size relative to the function definition itself. Naturally, when the impl has a where clause of its own, it gets shrunken even further:~~ (This is no longer a problem because the design changed and rendered this concern moot.) The lookup currently just looks at the top-level type, not looking inside things like Result or Option, which renders the spotlights on Read/Write a little less useful: <details><summary>`File::{open, create}` don't have spotlight info (pic of old design)</summary> ![image](https://user-images.githubusercontent.com/5217170/31209495-e59d027e-a950-11e7-9998-ceefceb71c07.png) </details> All three of the initially spotlighted traits are generically implemented on `&mut` references. Rustdoc currently treats a `&mut T` reference-to-a-generic as an impl on the reference primitive itself. `&mut Self` counts as a generic in the eyes of rustdoc. All this combines to create this lovely scene on `Iterator::by_ref`: <details><summary>`Iterator::by_ref` spotlights Iterator, Read, and Write (pic of old design)</summary> ![image](https://user-images.githubusercontent.com/5217170/31209554-50b271ca-a951-11e7-928b-4f83416c8681.png) </details>
2017-11-17spotlight Iterator/Read/Write impls on function return typesQuietMisdreavus-0/+2
2017-11-15Support `extern type` in rustdoc.kennytm-0/+5
Fixes #45640.
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-3/+3
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-09-18incr.comp.: Already hash HIR bodies during metadata export so they don't ↵Michael Woerister-2/+2
have to be hashed in downstream crates.
2017-09-14rustdoc: pretty-print Unevaluated expressions in types.Eduard-Mihai Burtescu-1/+1
2017-09-07rustc: Remove `CrateStore::crates` as a methodAlex Crichton-1/+1
This commit moves the `crates` method to a query and then migrates all callers to use a query instead of the now-renamed `crates_untracked` method where possible. Closes #41417
2017-09-05rustc: Rename item_body query to extern_const_bodyAlex Crichton-1/+1
Should hopefully more accurately reflect what's happening! This commit also removes the cache in the cstore implementation as it's already cached through the query infrastructure.
2017-09-05rustc: Migrate `CrateStore::item_body` to a queryAlex Crichton-1/+1
This commit migrates the `item_body` method on `CrateStore` to a query instead to enable better tracking of dependencies and whatnot.
2017-09-05rustc: Remove lang item methods from CrateStoreAlex Crichton-20/+21
Given the previous commit, these are now trivially representable as queries!
2017-09-05rustc: Flag some CrateStore methods as "untracked"Alex Crichton-3/+3
The main use of `CrateStore` *before* the `TyCtxt` is created is during resolution, but we want to be sure that any methods used before resolution are not used after the `TyCtxt` is created. This commit starts moving the methods used by resolve to all be named `{name}_untracked` where the rest of the compiler uses just `{name}` as a query. During this transition a number of new queries were added to account for post-resolve usage of these methods.
2017-09-05rustc: Move implementations_of_trait to a queryAlex Crichton-2/+4
While we're at it, make it two separate queries so one's for rustdoc and one's for the compiler, hopefully being a bit more targeted.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-13/+13
Like #43008 (f668999), but _much more aggressive_.
2017-08-11Fix some typosBastien Orivel-1/+1
2017-06-27rustc: move the PolyFnSig out of TyFnDef.Eduard-Mihai Burtescu-1/+1
2017-06-13On-demand is_const_fnTaylor Cramer-2/+2
2017-06-13Auto merge of #42608 - ollie27:rustdoc_variant_reexport, r=QuietMisdreavusbors-4/+4
rustdoc: Fix missing enum variant reexports Fixes #35488
2017-06-12rustdoc: Fix missing enum variant reexportsOliver Middleton-4/+4
2017-06-07Fix translation of external spans.Inokentiy Babushkin-1/+1
2017-05-28fix RUST_LOG ICE caused by printing a default impl's DefIdAriel Ben-Yehuda-1/+1
2017-05-25Fix merge conflicts.Jeffrey Seyfried-1/+1
2017-05-22rustdoc: Fix names of items in cross crate reexported modulesOliver Middleton-22/+6
For renamed reexports the new name should be used.
2017-05-01Queryify item_body_nested_bodiesTaylor Cramer-2/+3
2017-04-24rustc: expose the common DUMMY_SP query case as tcx methods.Eduard-Mihai Burtescu-2/+1
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-26/+26
2017-04-23rustc: make the const-eval cache polymorphic.Eduard-Mihai Burtescu-1/+1
2017-03-23convert inherent-impl-related things to on-demand queriesNiko Matsakis-5/+3
There are now 3 queries: - inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with all its inherent impls. This internally uses `crate_inherent_impls`, doing some hacks to keep the current deps (which, btw, are not clearly correct). - crate_inherent_impls(crate): gathers up a map from types to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating errors. - crate_inherent_impls_overlap_check(crate): performs overlap checks between the inherent impls for a given type, generating errors.
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-1/+2
2017-02-25rustc: combine BareFnTy and ClosureTy into FnSig.Eduard-Mihai Burtescu-8/+4
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-1/+1
2016-12-30Make rustdoc aware of the primitive i128 typeest31-0/+2
Many thanks to ollie27 for spotting all the places.
2016-12-28rustdoc: pretty-print nested bodies in inlined constants.Eduard-Mihai Burtescu-4/+27
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-5/+4
2016-12-28rustc: simplify constant cross-crate loading and rustc_passes::consts.Eduard-Mihai Burtescu-12/+4
2016-12-02Auto merge of #38053 - eddyb:lazy-9, r=nikomatsakisbors-3/+2
[9/n] rustc: move type information out of AdtDef and TraitDef. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/37688) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> Both `AdtDef` and `TraitDef` contained type information (field types, generics and predicates) which was required to create them, preventing their use before that type information exists, or in the case of field types, *mutation* was required, leading to a variance-magicking implementation of `ivar`s. This PR takes that information out and the resulting cleaner setup could even eventually end up merged with HIR, because, just like `AssociatedItem` before it, there's no dependency on types anymore. (With one exception, variant discriminants should probably be moved into their own map later.)
2016-11-30rustdoc: link to cross-crate sources directly.Eduard-Mihai Burtescu-5/+5
2016-11-29rustc: remove type information from TraitDef.Eduard-Mihai Burtescu-3/+2
2016-11-28rustc: embed path resolutions into the HIR instead of keeping DefMap.Eduard-Mihai Burtescu-11/+8
2016-11-24rustdoc: we can now assume DocContext always has a TyCtxt.Eduard-Mihai Burtescu-105/+84
2016-11-24rustdoc: use libsyntax ast::Attribute instead of "cleaning" them.Eduard-Mihai Burtescu-4/+4
2016-11-17hash the contents of impl-item-ref by adding them to visitorNiko Matsakis-2/+2
Also simplify some of the `ty::AssociatedItem` representation, in particular by folding `has_value` into `hir::Defaultness`
2016-11-10rustc: clean up lookup_item_type and remove TypeScheme.Eduard Burtescu-27/+21
2016-11-10rustc: unify and simplify managing associated items.Eduard Burtescu-28/+23
2016-11-08Replace FnvHasher use with FxHasher.Nicholas Nethercote-3/+3
This speeds up compilation by 3--6% across most of rustc-benchmarks.
2016-10-06Rollup merge of #36966 - ollie27:rustdoc_mut_ptr_impl, r=alexcrichtonJonathan Turner-2/+2
rustdoc: Fix missing *mut T impl `impl<T> *mut T` is currently missing from https://doc.rust-lang.org/nightly/std/primitive.pointer.html and this adds it back.