summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2015-04-23Fix some missing casesNiko Matsakis-1/+1
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.
2015-03-23rollup merge of #23633: tomjakubowski/rustdoc-array-primAlex Crichton-1/+5
Previously, impls for `[T; n]` were collected in the same place as impls for `[T]` and `&[T]`. This splits them out into their own primitive page in both core and std.
2015-03-23Add generic conversion traitsAaron Turon-1/+1
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
2015-03-23rustdoc: Support for "array" primitiveTom Jakubowski-1/+5
Impls on `clean::Type::FixedVector` are now collected in the array primitive page instead of the slice primitive page. Also add a primitive docs for arrays to `std`.
2015-03-12rustdoc: Fix ICE with cross-crate default implsAlex Crichton-11/+57
This adds a special code path for impls which are listed as default impls to ensure that they're loaded correctly.
2015-03-11syntax: move MethMac to MacImplItem and combine {Provided,Required}Method ↵Eduard Burtescu-12/+22
into MethodTraitItem.
2015-03-11syntax: rename TypeMethod to MethodSig and use it in MethDecl.Eduard Burtescu-8/+8
2015-03-11syntax: gather common fields of impl & trait items into their respective types.Eduard Burtescu-162/+64
2015-03-05Auto merge of #23026 - nikomatsakis:issue-20220-supertrait, r=nikomatsakisbors-3/+1
The main gist of this PR is commit 1077efb which removes the list of supertraits from the `TraitDef` and pulls them into a separate table, which is accessed via `lookup_super_predicates`. This is analogous to `lookup_predicates`, which gets the complete where clause. This allows us to create the `TraitDef`, which contains the list generics and so forth, without fully knowing the list of supertraits. This in turn allows the *supertrait listing* to contain references to associated types like `<Self as Foo>::Item`, which were previously impossible because conversion required having the `TraitDef` for `Foo`. We do not yet support `Self::Item` in a supertrait listing. This doesn't work because to convert that, it attempts to expand out the full set of supertraits, which are in the process of being created. This could potentially be worked out by having the expansion of supertraits proceed in a lazy fashion, but we'd have to define shadowing rules for associated types which we don't currently have. Along the way (in 9de9ec5) I also removed the restriction against duplicate bounds and generalized the code so that it can handle having the same supertrait multiple times with different arguments, e.g. `Foo : Bar<i32> + Bar<u32>`. This restriction was serving no particular purpose, since the same trait could be extended multiple times indirectly, and in the era of multidispatch it is actively harmful. This is technically a [breaking-change] because it affects the definition of a super-trait. Anything in a where clause that looks like `where Self : Foo` is now considered a supertrait. Because cycles are disallowed in supertraits, that could lead to some errors. This has not been observed in any existing code. r? @nrc
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-3/+3
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-03-04Separate supertrait collection from processing a `TraitDef`. This allowsNiko Matsakis-3/+1
us to construct trait-references and do other things without forcing a full evaluation of the supertraits. One downside of this scheme is that we must invoke `ensure_super_predicates` before using any construct that might require knowing about the super-predicates.
2015-02-27Auto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichtonbors-0/+3
rustdoc impl item did not include default methods for local crates, but did include them for external crates. This resulted in duplicate methods. Fix so that impl item does not include default methods for external crates. Fix #22595.
2015-02-24Remove bounds struct from TypeParameterDef. Bounds information is nowNiko Matsakis-5/+2
exclusively stored in the where clauses.
2015-02-24Fix duplicate methods in rustdocSeo Sanghyeon-0/+3
2015-02-24Implement `<T>::method` UFCS expression syntax.Eduard Burtescu-5/+5
2015-02-24rustc: combine partial_def_map and last_private_map into def_map.Eduard Burtescu-3/+3
2015-02-24rustc_resolve: use the visitor model more, remove redundant repeated lookups.Eduard Burtescu-3/+0
2015-02-24syntax: use a single Path for Trait::Item in QPath.Eduard Burtescu-2/+4
2015-02-24rustc_resolve: use DefAssociatedTy for TyQPath.Eduard Burtescu-11/+7
2015-02-24syntax: don't use TraitRef in QPath.Eduard Burtescu-1/+1
2015-02-24syntax: don't store a secondary NodeId for TyPath.Eduard Burtescu-2/+2
2015-02-24Revert bogus rename from DefTrait to DefaultImpl.Eduard Burtescu-2/+2
2015-02-24Remove ty_open and treat Unsized lvalues as *Unsized.Eduard Burtescu-1/+0
2015-02-24Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakisbors-2/+2
This is one more step towards completing #13231 This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go. The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items. Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well. This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-22Rename DefTrait to DefaultImplFlavio Percoco-2/+2
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-15Count and show the deprecated attribute againSimonas Kazlauskas-0/+3
Since we don’t have Deprecated stability level anymore, the only other source of information is deprecated-since version, which conveniently to us, only exists if the symbol is deprecated. Fixes #21789
2015-02-12Rote changes to fix fallout throughout the compiler from splitting theNiko Matsakis-14/+25
predicates and renaming some things.
2015-02-08Auto merge of #21999 - tomjakubowski:rustdoc-fixes, r=alexcrichtonbors-1/+8
r? @alexcrichton
2015-02-07Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichtonbors-18/+18
It's in order to make the code more homogeneous.
2015-02-06librustdoc has been updatedGuillaumeGomez-18/+18
Fixes run build error Fix test failure Fix tests' errors
2015-02-06rustdoc: Show non-Rust ABIs on methodsTom Jakubowski-1/+8
Fix #21621
2015-02-05make codemap more robust in face of ill-formed spans.Felix S. Klock II-2/+2
This can be considered partial work on #8256. The main observable change: macro expansion sometimes results in spans where `lo > hi`; so for now, when we have such a span, do not attempt to return a snippet result. (Longer term, we might think about whether we could still present a snippet for the cases where this arises, e.g. perhaps by showing the whole macro as the snippet, assuming that is the sole cause of such spans; or by somehow looking up the closest AST node that holds both `lo` and `hi`, and showing that.) As a drive-by, revised the API to return a `Result` rather than an `Option`, with better information-packed error value that should help us (and maybe also our users) identify the causes of such problems in the future. Ideally the call-sites that really want an actual snippet would be updated to catch the newly added `Err` case and print something meaningful about it, but that is not part of this PR.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-21/+20
2015-02-03Rename std::path to std::old_pathAaron Turon-1/+1
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-1/+1
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`