about summary refs log tree commit diff
path: root/src/librustdoc/fold.rs
AgeCommit message (Collapse)AuthorLines
2019-12-22Format the worldMark Rousskov-39/+30
2019-08-11Remove ReentrantMutexMark Rousskov-4/+4
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-02-23Transition librustdoc to 2018 editionHirokazu Hata-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-20shuffle ownership of `external_traits`QuietMisdreavus-7/+8
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-07-30Delete unused code in rustdocMark Rousskov-12/+6
2018-07-19Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavusbors-1/+10
RFC 2008 non-exhaustive enums/structs: Rustdoc Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required. r? @QuietMisdreavus (not sure if this is the right person, just guessing)
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-3/+6
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-05Simplified checking for non_exhaustive attribute.David Wood-2/+1
2018-06-27Display #[non_exhaustive] in rustdoc on types.David Wood-2/+12
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-3/+2
Like #43008 (f668999), but _much more aggressive_.
2016-10-02Remove redundant 'Variant' in variant names, stop reexporting.Corey Farwell-2/+2
2016-09-03Support unions in rustdocVadim Petrochenkov-0/+7
2016-04-02Make the rendering process less pass-awaremitaa-12/+44
Instead of hardcoding knowledge about the strip-private pass into the rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`. Rustdoc will, for example, generate redirect pages for public items contained in private modules which have been re-exported to somewhere externally reachable - this will now not only work for the `strip-private` pass, but for other passes as well, such as the `strip-hidden` pass.
2016-03-04This doesn't seem necessary?mitaa-26/+14
2016-03-04Simplify `if let`/`match` expressionsmitaa-0/+1
2015-12-12Support `#[deprecated]` in rustdocVadim Petrochenkov-2/+3
2015-04-07rustdoc: Run external traits through filtersAlex Crichton-1/+8
This ensures that all external traits are run through the same filters that the rest of the AST goes through, stripping hidden function as necessary. Closes #13698
2015-03-11syntax: gather common fields of impl & trait items into their respective types.Eduard Burtescu-26/+2
2015-01-02Fix fallout from change, adding explicit `Sized` annotations where necessary.Niko Matsakis-1/+1
2014-12-13librustdoc: fix falloutJorge Aparicio-2/+1
2014-11-08Renamed Extendable to Extendgamazeps-1/+1
In order to upgrade, simply rename the Extendable trait to Extend in your code Part of #18424 [breaking-change]
2014-09-19Add enum variants to the type namespaceNick Cameron-2/+2
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-0/+6
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-16Fallout from renamingAaron Turon-6/+6
2014-08-14librustc: Stop assuming that implementations and traits only containPatrick Walton-9/+11
methods. This paves the way to associated items by introducing an extra level of abstraction ("impl-or-trait item") between traits/implementations and methods. This new abstraction is encoded in the metadata and used throughout the compiler where appropriate. There are no functional changes; this is purely a refactoring.
2014-06-30rustdoc: incorporate stability index throughoutAaron Turon-2/+2
This commit hooks rustdoc into the stability index infrastructure in two ways: 1. It looks up stability levels via the index, rather than by manual attributes. 2. It adds stability level information throughout rustdoc output, rather than just at the top header. In particular, a stability color (with mouseover text) appears next to essentially every item that appears in rustdoc's HTML output. Along the way, the stability index code has been lightly refactored.
2014-05-22rustdoc: Fill in external trait methodsAlex Crichton-2/+2
This commit alters rustdoc to crawl the metadata of upstream libraries in order to fill in default methods for traits implemented in downstream crates. This, for example, documents the `insert` function on hash maps. This is a fairly lossy extraction from the metadata. Documentation and attributes are lost, but they aren't used anyway. Unfortunately, argument names are also lost because they are not present in the metadata. Source links are also lost because the spans are not serialized. While not perfect, it appears that presenting this documentation through rustdoc is much better than nothing, so I wanted to land this to allow iteration on it later on.
2014-03-25Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by ↵Marvin Löbel-5/+5
value
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-5/+5
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-02-26Mark top level module as a crate in rustdoc, closes #12507Florian Hahn-1/+4
2014-02-11librustdoc -- move closure to clarify scopeNiko Matsakis-1/+1
2014-02-11Move replace and swap to std::mem. Get rid of std::utilEdward Wang-3/+2
Also move Void to std::any, move drop to std::mem and reexport in prelude.
2013-12-16Fix rustdoc output of enums with private variantsSteven Fackler-10/+5
Previously, if every variant was private, it would display as a variantless enum instead of having the "some variants stripped" comment.
2013-10-13Make Rustdoc strip private fieldsSteven Fackler-0/+6
In addition, the renderer will add comments to structs and enums saying that fields or variants have been stripped.
2013-09-22rustdoc: Out with the old, in with the newAlex Crichton-393/+88
Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-7/+7
cc #5898
2013-08-07Change const to staticSangeun Kim-14/+14
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-25/+25
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-12/+12
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-16/+14
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-2/+1
2013-06-13rustdoc: fix tests for @~str -> @str change.Huon Wilson-4/+4
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-4/+4
2013-04-27only use #[no_core] in libcoreDaniel Micay-4/+0
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-4/+4
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-1/+1
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-4/+4