about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
AgeCommit message (Collapse)AuthorLines
2014-11-26rollup merge of #19272: tomjakubowski/rustdoc-sizedAlex Crichton-0/+3
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-0/+3
Both `trait Foo for Sized?` and `<Sized? T>` are handled correctly. Fix #18515
2014-11-24rustdoc: render ast::QPathTom Jakubowski-0/+3
Fix #18594
2014-11-24rustdoc: Render associated types on traits and implsTom Jakubowski-2/+1
2014-11-23std: Add a new top-level thread_local moduleAlex Crichton-14/+12
This commit removes the `std::local_data` module in favor of a new `std::thread_local` module providing thread local storage. The module provides two variants of TLS: one which owns its contents and one which is based on scoped references. Each implementation has pros and cons listed in the documentation. Both flavors have accessors through a function called `with` which yield a reference to a closure provided. Both flavors also panic if a reference cannot be yielded and provide a function to test whether an access would panic or not. This is an implementation of [RFC 461][rfc] and full details can be found in that RFC. This is a breaking change due to the removal of the `std::local_data` module. All users can migrate to the new thread local system like so: thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None))) The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as an implementation detail which must now be explicitly stated by users. [rfc]: https://github.com/rust-lang/rfcs/pull/461 [breaking-change]
2014-11-16Complete the removal of ty_nil, ast::LitNil, ast::TyBot and ast::TyUniqJakub Bukaj-20/+14
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
2014-11-06rollup merge of #18630 : nikomatsakis/purge-the-barsAlex Crichton-5/+1
2014-11-06Fallout from collection conventionsAlexis Beingessner-2/+2
2014-11-06Remove the unboxed closure `|:|` notation from types and trait references ↵Niko Matsakis-5/+1
completely.
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
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-19Remove a large amount of deprecated functionalityAlex Crichton-3/+5
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-08librustdoc/html: recognize slices not to nest A tags.NODA, Kai-1/+19
1. A slice of parametrized type, say BorrowedRef { ... Vector(Generic(T)) }, is rendered as "<a href='primitive.slice.html'>&amp;[T]</a>" 2. A slice of other types, say BorrowedRef { ... Vector(int) }, is rendered as "<a href='primitive.slice.html'>&amp;[</a> <a href='primitive.int.html'>int</a> <a href='primitive.slice.html'>]</a>" 3. Other cases, say BorrowedRef { ... int }, are rendered as same as before: "&<a href='primitive.int.html'>int</a>" Relevant W3C specs: - http://www.w3.org/TR/html401/struct/links.html#h-12.2.2 12.2.2 Nested links are illegal - http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element states A tag must not enclose any "interactive contents" which include A tags themselves.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-10-06rustdoc: Remove dummy UnknownBound variantTom Jakubowski-5/+1
2014-10-06rustdoc: Support unboxed fn sugar in boundsTom Jakubowski-3/+3
2014-10-06rustdoc: Correctly name lifetimes in boundsTom Jakubowski-3/+11
Fix #16518
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-1/+1
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-3/+3
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02rustdoc: remove handling of Gc.Eduard Burtescu-1/+1
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-8/+37
Fix #16546
2014-09-19Add enum variants to the type namespaceNick Cameron-1/+1
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-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-8/+1
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-1/+1
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-08-12Implement Index for HashMapP1start-6/+6
This also deprecates HashMap::get. Use indexing instead.
2014-07-28rustdoc: improvements to stability dashboardAaron Turon-24/+33
* Makes dashboard width dynamic. * Colors unmarked items. * Gives overall crate percentages.
2014-07-25rustdoc: Fix links to Box/GcAlex Crichton-3/+3
These are lang items now, so the internal representations need to be re-translated back to the original structures manually. Closes #15185 Closes #15800
2014-07-24libsyntax: Remove `~self` and `mut ~self` from the language.Patrick Walton-1/+1
This eliminates the last vestige of the `~` syntax. Instead of `~self`, write `self: Box<TypeOfSelf>`; instead of `mut ~self`, write `mut self: Box<TypeOfSelf>`, replacing `TypeOfSelf` with the self-type parameter as specified in the implementation. Closes #13885. [breaking-change]
2014-07-16librustc: Implement the fully-expanded, UFCS form of explicit self.Patrick Walton-0/+3
This makes two changes to region inference: (1) it allows region inference to relate early-bound regions; and (2) it allows regions to be related before variance runs. The former is needed because there is no relation between the two regions before region substitution happens, while the latter is needed because type collection has to run before variance. We assume that, before variance is inferred, that lifetimes are invariant. This is a conservative overapproximation. This relates to #13885. This does not remove `~self` from the language yet, however. [breaking-change]
2014-07-17deprecate Vec::getNick Cameron-1/+1
2014-07-13auto merge of #15614 : lucidd/rust/#15474, r=alexcrichtonbors-1/+4
This fixes #15474
2014-07-12auto merge of #15605 : blake2-ppc/rust/rustdoc-const-t, r=alexcrichtonbors-1/+12
Update the formatting of raw immutable pointers to print *const T.
2014-07-11rustdoc: render 1-tuples as (T,) instead of (T)Kevin Walter-1/+4
2014-07-11rustdoc: Change type name of raw pointer from *T to *const Troot-1/+12
Update the formatting of raw immutable pointers to print *const T.
2014-07-10rustdoc: Add stability dashboardAaron Turon-0/+70
This commit adds a crate-level dashboard summarizing the stability levels of all items for all submodules of the crate. The information is also written as a json file, intended for consumption by pages like http://huonw.github.io/isrustfastyet/ Closes #13541
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-4/+4
[breaking-change]
2014-07-02rustdoc: s/nil/unit/ internally.Huon Wilson-4/+4
Quick poll on IRC suggested that unit was the preferred name for ().
2014-06-30rustdoc: incorporate stability index throughoutAaron Turon-0/+35
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-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-21rustdoc: show default type parameters in genericsTom Jakubowski-0/+5
fix #12291
2014-06-17rustdoc: Remove outdated syntaxAlex Crichton-7/+4
Fixing some of rustdoc's rendering to use newer syntaxes rather than older syntaxes.
2014-06-15Register new snapshotsAlex Crichton-1/+0
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-24/+17
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-06rustdoc: Inline static documentation across cratesAlex Crichton-22/+19
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-05-31rustdoc: Fix cross-crate links to reexported itemsAlex Crichton-8/+2
Cross crate links can target items which are not rendered in the documentation. If the item is reexported at a higher level, the destination of the link (a concatenation of the fully qualified name) may actually lead to nowhere. This fixes this problem by altering rustdoc to emit pages which redirect to the local copy of the reexported structure. cc #14515 Closes #14137
2014-05-31doc: Fix a number of broken linksAlex Crichton-4/+10
cc #14515
2014-05-31rustdoc: Create anchor pages for primitive typesAlex Crichton-30/+60
This commit adds support in rustdoc to recognize the `#[doc(primitive = "foo")]` attribute. This attribute indicates that the current module is the "owner" of the primitive type `foo`. For rustdoc, this means that the doc-comment for the module is the doc-comment for the primitive type, plus a signal to all downstream crates that hyperlinks for primitive types will be directed at the crate containing the `#[doc]` directive. Additionally, rustdoc will favor crates closest to the one being documented which "implements the primitive type". For example, documentation of libcore links to libcore for primitive types, but documentation for libstd and beyond all links to libstd for primitive types. This change involves no compiler modifications, it is purely a rustdoc change. The landing pages for the primitive types primarily serve to show a list of implemented traits for the primitive type itself. The primitive types documented includes both strings and slices in a semi-ad-hoc way, but in a way that should provide at least somewhat meaningful documentation. Closes #14474
2014-05-29auto merge of #14510 : kballard/rust/rename_strallocating_into_owned, ↵bors-1/+1
r=alexcrichton We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.