summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-2/+2
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2014-12-26Changes to RustDocNick Cameron-3/+2
2014-12-24rustdoc: render higher-rank trait boundsTom Jakubowski-1/+1
Fix #19915
2014-12-22Rote changes that don't care to distinguish between a fn pointer and a fn item.Niko Matsakis-1/+1
2014-12-15rollup merge of #19774: tomjakubowski/rustdoc-consts-staticsBrian Anderson-0/+22
Build `clean::ConstantItem` values in the `inline` module and pretty-print the AST for inlined const items. Doc strings are still missing from inlined constants (see #19773). Partially address #18156, #19722, #19185 Fix #15821 r? @alexcrichton
2014-12-14Parse `unsafe trait` but do not do anything with it beyond parsing and ↵Niko Matsakis-0/+1
integrating into rustdoc etc.
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-4/+4
2014-12-12rustdoc: Properly inline const itemsTom Jakubowski-0/+22
Build `clean::ConstantItem` values in the `inline` module and pretty-print the AST for inlined const items. Doc strings are still missing from inlined constants (see #19773). Partially address #18156, #19722, #19185 Fix #15821
2014-12-06librustdoc: remove unnecessary `as_slice()` callsJorge Aparicio-2/+2
2014-11-26rollup merge of #19272: tomjakubowski/rustdoc-sizedAlex Crichton-1/+2
Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly. Fix #18515
2014-11-25Fallout from stabilizationAaron Turon-1/+1
2014-11-24rustdoc: Render Sized? on traits and genericsTom Jakubowski-1/+2
Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly. Fix #18515
2014-11-19rustc: middle: remove obsolete ty::get.Eduard Burtescu-2/+2
2014-11-06rollup merge of #18630 : nikomatsakis/purge-the-barsAlex Crichton-1/+0
2014-11-06Fallout from collection conventionsAlexis Beingessner-2/+2
2014-11-06Remove the unboxed closure `|:|` notation from types and trait references ↵Niko Matsakis-1/+0
completely.
2014-11-01Fix RustDoc bugNick Cameron-9/+8
2014-10-29Rename fail! to panic!Steve Klabnik-3/+3
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-06rustdoc: Remove dummy UnknownBound variantTom Jakubowski-2/+1
2014-10-06rustdoc: Support unboxed fn sugar in boundsTom Jakubowski-1/+1
2014-10-06rustdoc: Correctly name lifetimes in boundsTom Jakubowski-1/+3
Fix #16518
2014-09-30Fixes ICE when using reexported unit-like structsMichael Kainer-5/+1
Fixes that unit-like structs cannot be used if they are reexported and used in another crate. The compiler fails with an ICE, because unit-like structs are exported as DefFn and the expression `UnitStruct` is interpreted as function pointer instead of a call to the constructor. To resolve this ambiguity tuple-like struct constructors are now exported as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new flag `is_ctor` in DefFn to true. Relevant changes are in `rustc::metadata::{encoder, decoder}` and in `rustc::middle::ty`. Closes #12660 and #16973.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-0/+4
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-17rustdoc: Correctly distinguish enums and typesP1start-1/+6
This is done by adding a new field to the `DefTy` variant of `middle::def::Def`, which also clarifies an error message in the process. Closes #16712.
2014-09-16Fallout from renamingAaron Turon-8/+8
2014-09-15Port coherence to use the new trait matching codeNiko Matsakis-1/+1
2014-09-08rustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.Eduard Burtescu-57/+52
2014-08-28auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichtonbors-3/+3
Per API meeting https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-13.md # Changes to `core::option` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. However, a few methods have been deprecated, either due to lack of use or redundancy: * `take_unwrap`, `get_ref` and `get_mut_ref` (redundant, and we prefer for this functionality to go through an explicit .unwrap) * `filtered` and `while` * `mutate` and `mutate_or_set` * `collect`: this functionality is being moved to a new `FromIterator` impl. # Changes to `core::result` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. * `collect`: this functionality is being moved to a new `FromIterator` impl. * `fold_` is deprecated due to lack of use * Several methods found in `core::option` are added here, including `iter`, `as_slice`, and variants. Due to deprecations, this is a: [breaking-change]
2014-08-28Fallout from stabilizing core::optionAaron Turon-3/+3
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-9/+3
2014-08-26rustdoc: Don't assume that a doc attribute was sugared: Fixes #15976Kevin Mehall-8/+1
As of 8876ce44, `is_sugared_doc` is encoded in metadata, so there is no need to assume that doc attributes came from sugared comments.
2014-08-14librustc: Stop assuming that implementations and traits only containPatrick Walton-27/+33
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-07-28rustdoc: show struct field docs when inlinedCorey Richardson-1/+1
Some minor changes to the compiler to expose this information. Very inconvenient since struct fields aren't an item. Adds (yet another) table to metadata. Closes #15739
2014-07-25rustdoc: Inline items from foreign modsAlex Crichton-16/+22
These were all just previously skipped. Closes #15648
2014-07-25rustdoc: Correctly handle local renamingsAlex Crichton-2/+13
Previously a `pub use` would not rename the destination in rustdoc, it would always use the destination ident instead of the renamed ident.
2014-07-25rustdoc: Fix inlining type parametersAlex Crichton-6/+7
I'm not entirely sure if the correct space can be inferred when cleaning Generics, so the impl has been switched to take the space explicitly. Closes #15099
2014-07-25rustdoc: Hide impls for #[doc(hidden)] traitsAlex Crichton-2/+27
Closes #14585
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-2/+2
[breaking-change]
2014-06-30rustdoc: incorporate stability index throughoutAaron Turon-0/+3
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-06-09rustdoc: Correctly classify enums/typedefsAlex Crichton-1/+1
Both of these items are surfaced as a DefTy, so some extra logic was needed in the decoder module to figure out whether one is actually an enum or whether it's a typedef. Closes #14757
2014-06-06Test fixes from the rollupAlex Crichton-1/+1
2014-06-06rustdoc: Inline static documentation across cratesAlex Crichton-0/+14
2014-06-06Move Def out of syntax crate, where it does not belongNiko Matsakis-10/+11
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-1/+1
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-06-05rustdoc: Include supertraits on inlined traitsTom Jakubowski-1/+9
Previously, documentation for an inlined trait (i.e. a trait imported and reexported from another crate) didn't display the trait's supertraits. Closes #14636
2014-06-02rustdoc: Correctly inline required/provided methodsAlex Crichton-7/+12
Apparently relying on provided_source in ty::Method is unreliable! Closes #14594
2014-06-01rustdoc: Ensure external impls are inlined onceAlex Crichton-10/+17
If the type associated with the impl is `pub use`'d or referenced twice in a downstream crate, the impl will attempt to be inlined twice. Closes #14584
2014-06-01rustdoc: Filter private methods from inlined implsAlex Crichton-2/+7
Closes #14583
2014-05-31rustdoc: Don't inline tuple struct constructorsAlex Crichton-0/+5
These don't actually point to anything, so there's no need to inline them.