summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
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`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-14/+14
2015-02-02Avoid an excessive use of iterator chainSeo Sanghyeon-15/+15
2015-01-30rollup merge of #21693: tomjakubowski/rustdoc-fix-21442Alex Crichton-1/+1
Fix #21442
2015-01-29rustdoc: Render new `self` syntax in `use`Tom Jakubowski-1/+1
Fix #21442
2015-01-29s/Show/Debug/gJorge Aparicio-49/+49
2015-01-28Update Rustdoc to deal with the Fn return type being an associated type.Niko Matsakis-5/+7
2015-01-26Merge remote-tracking branch 'rust-lang/master'Brian Anderson-1/+1
Conflicts: src/librustc/lint/builtin.rs src/librustc/lint/context.rs
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-1/+1
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-153/+175
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-21Remove 'since' from unstable attributesBrian Anderson-1/+2
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-3/+10
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-111/+78
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21Test fixes and rebase conflictsAlex Crichton-1/+1