summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2015-08-04rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.Eduard Burtescu-1/+1
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-11/+11
2015-07-21Use a span from the correct file for the inner span of a moduleNick Cameron-0/+4
This basically only affects modules which are empty (or only contain comments). Closes #26755
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-3/+3
Fixes #26900
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-3/+3
2015-07-08Remove snake_case names from ty.rsJared Roesch-1/+1
2015-06-26rustc: switch most remaining middle::ty functions to methods.Eduard Burtescu-25/+24
2015-06-23Remove the mostly unecessary ParamBounds structJared Roesch-13/+0
2015-06-19rustc: replace Repr/UserString impls with Debug/Display ones.Eduard Burtescu-1/+1
2015-06-12Split TyArray into TyArray and TySlice.Eli Friedman-3/+3
Arrays and slices are closely related, but not that closely; making the separation more explicit is generally more clear.
2015-06-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-41/+39
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-11Conver reborrows to .iter() calls where appropriateJoshua Landau-1/+1
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-13/+13
2015-06-08Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichtonbors-1/+1
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical. Let’s deprecate now and plan to remove in the next cycle. (It’s `#[unstable]`.) r? @alexcrichton CC @nagisa
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-06-07change some statics to constantsOliver 'ker' Schneider-1/+1
2015-05-27Auto merge of #25796 - arielb1:default-assoc, r=eddybbors-39/+38
r? @eddyb Fixes #19476.
2015-05-26Auto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichtonbors-18/+32
rustdoc: Associated type fixes The first commit fixes a bug with "dud" items in the search index from misrepresented `type` items in trait impl blocks. For a trait *implementation* there are typedefs which are the types for that particular trait and implementor. Skip these in the search index. There were lots of dud items in the search index due to this (search for Item, Iterator's associated type). Add a boolean to clean::TypedefItem so that it tracks whether the it is a type alias on its own, or if it's a `type` item in a trait impl. The second commit fixes a bug that made signatures and where bounds using associated types (if they were not on `Self`) incorrect. The third commit fixes so that where clauses in type alias definititons are shown. Fixes #22442 Fixes #24417 Fixes #25769
2015-05-26Implement defaults for associated typesAriel Ben-Yehuda-39/+38
2015-05-26Make caching in stability work. This improves stability check performanceAriel Ben-Yehuda-0/+15
by 90%.
2015-05-25rustdoc: Fix associated types in signaturesUlrik Sverdrup-12/+26
Functions such as `fn foo<I: Iterator>(x: I::Item)` would not render correctly and displayed `I` instead of `I::Item`. Same thing with `I::Item` appearing in where bounds. This fixes the bug by using paths for generics. Fixes #24417
2015-05-21Make various fixes:Niko Matsakis-2/+5
- add feature gate - add basic tests - adjust parser to eliminate conflict between `const fn` and associated constants - allow `const fn` in traits/trait-impls, but forbid later in type check - correct some merge conflicts
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-2/+9
2015-05-21rustdoc: Skip types in impls in search indexUlrik Sverdrup-6/+6
For a trait *implementation* there are typedefs which are the types for that particular trait and implementor. Skip these in the search index. There were lots of dud items in the search index due to this (search for Item, Iterator's associated type). Add a boolean to clean::TypedefItem so that it tracks whether the it is a type alias on its own, or if it's a `type` item in a trait impl. Fixes #22442
2015-05-12Auto merge of #25323 - eddyb:coherent-coherence, r=pnkfelixbors-1/+1
The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait. Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2. Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements. On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes #22068. It also peaks at only 1.2MB, instead of 16MB of heap usage.
2015-05-12rustc: rename ty::populate_implementations_for_type_if_necessary to make it ↵Eduard Burtescu-1/+1
clear that it only populates inherent impls.
2015-05-11Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnikbors-1/+1
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
2015-05-06fix typos caught by codespellTshepang Lekhonkhobe-1/+1
2015-05-03Update old uses of ~ in comments and debugging statementsCarol Nichols-1/+1
2015-04-23Get associated consts working in match patterns.Sean Patrick Santos-0/+2
2015-04-23Functional changes for associated constants. Cross-crate usage of associated ↵Sean Patrick Santos-4/+25
constants is not yet working.
2015-04-23Structural changes for associated constantsSean Patrick Santos-0/+28
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-17Fix some missing casesNiko Matsakis-1/+1
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-27/+106
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-16rustdoc: Fix cross-crate macro source linksAlex Crichton-0/+3
The source filename for cross crate macros isn't quite right so the normal generated links are invalid. Closes #21311
2015-04-16rustdoc: Overhaul stability displaysAlex Crichton-0/+16
This commit is an overhaul to how rustdoc deals with stability of the standard library. The handling has all been revisited with respect to Rust's current approach to stability in terms of implementation as well as the state of the standard library today. The high level changes made were: * Stable items now have no marker by default * Color-based small stability markers have been removed * Module listings now fade out unstable/deprecated items slightly * Trait methods have a separate background color based on stability and also list the reason that they are unstable. * `impl` blocks with stability no longer render at all. This may be re-added once the compiler recognizes stability on `impl` blocks. * `impl` blocks no longer have stability of the methods implemente indicated * The stability summary has been removed Closes #15468 Closes #21674 Closes #24201
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-1/+1
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-2/+2
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-07rustdoc: Index inherent methods on primitivesAlex Crichton-0/+15
The set of types which can have an inherent impl changed slightly and rustdoc just needed to catch up to understand what it means to see a `impl str`! Closes #23511
2015-04-07rustdoc: Handle duplicate reexports listedAlex Crichton-2/+7
This ends up causing duplicate output in rustdoc. The source of these duplicates is that the item is defined in both resolve namespaces, so it's listed twice. Closes #23207
2015-04-07rustdoc: Encode ABI in all methodsAlex Crichton-3/+14
This commit ensures that the ABI of functions is propagated all the way through to the documentation. Closes #22038
2015-04-07rustdoc: Simplify predicates with paren notationAlex Crichton-12/+56
This change is aimed at improving cross-crate (inlined) notation of generic closures. The change modifies `simplify::where_predicates` to handle parenthesized notation as well as starting to handle supertrait bounds as well. This was necessary because all output constraints of closures are bound to `FnOnce` but most trait bounds are that of `FnMut`. Close #21801
2015-04-07rustdoc: Detect provided methods on inlined traitsAlex Crichton-7/+30
Closes #23864
2015-04-07rustdoc: Improve handling inlined associated typesAlex Crichton-57/+171
* All bounds are now discovered through the trait to be inlined. * The `?Sized` bound now renders correctly for inlined associated types. * All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a hyperlink to the trait `B`. This should improve at least how the docs look at least. * Supertrait bounds are now separated and display as the source lists them. Closes #20727 Closes #21145
2015-04-07rustdoc: Simplify cross-crate where clausesAlex Crichton-10/+149
Add a custom module to rustdoc which simplifies the output of `middle::ty` into a more readable form which tends to be written down anyway! Closes #20646
2015-04-07rustdoc: Allowing specifying attrs for doctestsAlex Crichton-1/+2
This adds support in rustdoc to blanket apply crate attributes to all doc tests for a crate at once. The syntax for doing this is: #![doc(test(attr(...)))] Each meta item in `...` will be applied to each doctest as a crate attribute. cc #18199
2015-04-07rustdoc: Add a primitive page for raw pointersAlex Crichton-0/+3
Closes #15318
2015-04-07rustdoc: Run external traits through filtersAlex Crichton-4/+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-04-01Test fixes and rebase conflicts, round 1Alex Crichton-2/+4
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-11/+11
Now that support has been removed, all lingering use cases are renamed.