about summary refs log tree commit diff
path: root/src/librustdoc/clean.rs
AgeCommit message (Collapse)AuthorLines
2014-05-25rustdoc: Move inlining to its own moduleAlex Crichton-2083/+0
2014-05-25rustdoc: Get [src] links working for inlined doxAlex Crichton-12/+35
These links work by hyperlinking back to the actual documentation page with a query parameter which will be recognized and then auto-click the appropriate [src] link.
2014-05-25rustdoc: Use csearch for impl loadingAlex Crichton-1/+1
The normal analysis passes aren't guaranteed to have loaded all impls, so use the csearch methods directly to load impls.
2014-05-25rustdoc: Inline reexported modulesAlex Crichton-0/+27
2014-05-25rustdoc: Inline names of function argumentsAlex Crichton-18/+26
2014-05-25rustdoc: Inline argument names of foreign methodsAlex Crichton-4/+14
2014-05-25rustdoc: Don't show reexported enum variantsAlex Crichton-0/+3
For now just assume that the enum type itself is reexported.
2014-05-25rustdoc: Inline enums across cratesAlex Crichton-0/+66
2014-05-25rustdoc: Start inlining structs across cratesAlex Crichton-27/+186
2014-05-25rustdoc: Inline documentation of `pub use`Alex Crichton-18/+113
This commit teaches rustdoc to inline the documentation for the destination of a `pub use` statement across crate boundaries. This is intended for the standard library's facade to show the fact that the facade is just an implementation detail rather than the api of the standard library itself. This starts out by inlining traits and functions, but more items will come soon. The current drawback of this system is that hyperlinks across crates sill go to the original item's definition rather than the reexported location.
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-29/+29
[breaking-change]
2014-05-24Get "make check" to work with unused-attributeSteven Fackler-3/+3
There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future.
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-1/+4
[breaking-change]
2014-05-22rustdoc: Fill in external trait methodsAlex Crichton-28/+339
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-05-15rustdoc: functions in ffi blocks are unsafeCorey Richardson-1/+1
Fixes #14188
2014-05-12librustdoc: Remove all `~str` usage from librustdoc.Patrick Walton-62/+70
2014-05-12librustc: Remove all uses of `~str` from librustc.Patrick Walton-1/+1
2014-05-09rustdoc: Hyperlink cross-crate reexportsAlex Crichton-47/+37
This should improve the libcore experience quite a bit when looking at the libstd documentation.
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-2/+2
2014-05-08auto merge of #13835 : alexcrichton/rust/localdata, r=brsonbors-8/+7
This commit brings the local_data api up to modern rust standards with a few key improvements: * All functionality is now exposed as a method on the keys themselves. Instead of importing std::local_data, you now use "key.set()" and "key.get()". * All closures have been removed in favor of RAII functionality. This means that get() and get_mut() no long require closures, but rather return Option<SmartPointer> where the smart pointer takes care of relinquishing the borrow and also implements the necessary Deref traits * The modify() function was removed to cut the local_data interface down to its bare essentials (similarly to how RefCell removed set/get). [breaking-change]
2014-05-07std: Modernize the local_data apiAlex Crichton-8/+7
This commit brings the local_data api up to modern rust standards with a few key improvements: * The `pop` and `set` methods have been combined into one method, `replace` * The `get_mut` method has been removed. All interior mutability should be done through `RefCell`. * All functionality is now exposed as a method on the keys themselves. Instead of importing std::local_data, you now use "key.replace()" and "key.get()". * All closures have been removed in favor of RAII functionality. This means that get() and get_mut() no long require closures, but rather return Option<SmartPointer> where the smart pointer takes care of relinquishing the borrow and also implements the necessary Deref traits * The modify() function was removed to cut the local_data interface down to its bare essentials (similarly to how RefCell removed set/get). [breaking-change]
2014-05-07auto merge of #14005 : alexcrichton/rust/extern-unsafe, r=pcwaltonbors-1/+1
Previously, the parser would not allow you to simultaneously implement a function with a different abi as well as being unsafe at the same time. This extends the parser to allow functions of the form: unsafe extern fn foo() { // ... } The closure type grammar was also changed to reflect this reversal, types previously written as "extern unsafe fn()" must now be written as "unsafe extern fn()". The parser currently has a hack which allows the old style, but this will go away once a snapshot has landed. Closes #10025 [breaking-change]
2014-05-07auto merge of #13958 : pcwalton/rust/detilde, r=pcwaltonbors-9/+9
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. r? @brson or @alexcrichton or whoever
2014-05-07auto merge of #13914 : alexcrichton/rust/pile-o-rustdoc-fixes, r=brsonbors-6/+12
Lots of assorted things here and there, all the details are in the commits. Closes #11712
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-9/+9
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-06rustc: Enable writing "unsafe extern fn() {}"Alex Crichton-1/+1
Previously, the parser would not allow you to simultaneously implement a function with a different abi as well as being unsafe at the same time. This extends the parser to allow functions of the form: unsafe extern fn foo() { // ... } The closure type grammar was also changed to reflect this reversal, types previously written as "extern unsafe fn()" must now be written as "unsafe extern fn()". The parser currently has a hack which allows the old style, but this will go away once a snapshot has landed. Closes #10025 [breaking-change]
2014-05-04auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichtobors-1/+2
This is needed to bootstrap fix for #5723.
2014-05-03Temporary patch to accept arbitrary lifetimes (behind feature gate) in bound ↵Niko Matsakis-1/+2
lists. This is needed to bootstrap fix for #5723.
2014-05-03rustdoc: Put bangs on the names of macrosAlex Crichton-1/+1
This makes them a little easier to search for and makes it clearer that they're a macro and not an item to import. Closes #13852
2014-05-03rustdoc: Stop requiring a crate ID attributeAlex Crichton-5/+11
This is mostly just an artificial requirement as it can use similar logic to the compiler to infer the crate id.
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-9/+9
2014-05-02syntax: store char literals/tokens as `char`s rather than u32s.Huon Wilson-2/+1
Clearly storing them as `char` is semantically nicer, but this also fixes a bug whereby `quote_expr!(cx, 'a')` wasn't working, because the code created by quotation was not matching the actual AST definitions.
2014-04-29rustdoc: Make strip_hidden use a dedicated hidden item if any.Kang Seonghoon-1/+16
fixes #13806.
2014-04-28auto merge of #13791 : lifthrasiir/rust/mod-inner-span, r=huonwbors-1/+18
This PR is primarily motivated by (and fixes) #12926. We currently only have a span for the individual item itself and not for the referred contents. This normally does not cause a problem since both are located in the same file; it *is* possible that the contained statement or item is located in the other file (the syntax extension can do that), but even in that case the syntax extension should be located in the same file as the item. The module item (i.e. `mod foo;`) is the only exception here, and thus warrants a special treatment. Rustdoc would now distinguish `mod foo;` from `mod foo {...}` by checking if the span for the module item and module contents is in different files. If it's the case, we'd prefer module contents over module item. There are alternative strategies, but as noted above we will have some corner cases if we don't record the contents span explicitly.
2014-04-27rustdoc: External module item links to the module contents. Fixes #12926.Kang Seonghoon-1/+18
the basic strategy is to distinguish `mod foo;` from `mod foo {...}` by checking if the span for the module item and module contents is in different files. if it's the case, we prefer module contents. it is technically possible to fix #12926 without changing the AST, probably by checking the individual items' span. this is not without a problem though, since it is possible that some items inside `mod foo {...}` may have originated from other file (e.g. `include!`). therefore it is better to record both spans explicitly.
2014-04-26rustdoc: Moved `SCHEMA_VERSION` to `clean`.Kang Seonghoon-0/+4
it should be changed when the module gets updated, so it helps to have the `SCHEMA_VERSION` with the definitions themselves.
2014-04-26syntax: ViewItemUse no longer contains multiple view paths.Kang Seonghoon-2/+2
it reflected the obsolete syntax `use a, b, c;` and did not make past the parser (though it was a non-fatal error so we can continue). this legacy affected many portions of rustc and rustdoc as well, so this commit cleans them up altogether.
2014-04-24rustdoc: fix de-@rooting falloutNiko Matsakis-3/+6
2014-04-20rustdoc: Display tuple structs correctlyAlex Crichton-10/+9
The fields of tuple structs recently gained the ability to have privacy associated with them, but rustdoc was not updated accodingly. This moves the struct field filtering to the rendering phase in order to preserve the ordering of struct fields to allow tuple structs to have their private fields printed as underscores. Closes #13594
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-9/+9
2014-04-11rustdoc: fix fallout from removing ast::Sigil.Eduard Burtescu-6/+4
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-3/+4
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-11/+11
updated associated variable and function names.
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-3/+4
port all code over to use it.
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-1/+1
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-03-31rustdoc: Switch field privacy as necessaryAlex Crichton-98/+106
2014-03-25rustdoc: render derived impls separatelyCorey Richardson-1/+14
2014-03-25rustdoc: add some docs for item typesCorey Richardson-0/+6
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-1/+1
Favor using '*' instead
2014-03-22rustdoc: Fix fallout of removing get()Alex Crichton-6/+4