summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2015-02-19Round 5 test fixes and rebase conflictsAlex Crichton-2/+2
2015-02-18Round 4 test fixes and rebase conflictsAlex Crichton-3/+3
2015-02-18Round 3 test fixes and conflictsAlex Crichton-10/+8
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-244/+240
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18Round 2 test fixes and conflictsAlex Crichton-11/+115
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-15/+15
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18rollup merge of #22210: aturon/stab-final-borrowAlex Crichton-382/+2
Conflicts: src/libcollections/btree/map.rs src/libcollections/str.rs src/libcollections/vec.rs src/libcore/borrow.rs src/libcore/hash/mod.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs
2015-02-18Round 1 fixes and rebase conflictsAlex Crichton-5/+5
2015-02-18Stabilize std::borrowAaron Turon-276/+0
This commit stabilizes `std::borrow`, making the following modifications to catch up the API with language changes: * It renames `BorrowFrom` to `Borrow`, as was originally intended (but blocked for technical reasons), and reorders the parameters accordingly. * It moves the type parameter of `ToOwned` to an associated type. This is somewhat less flexible, in that each borrowed type must have a unique owned type, but leads to a significant simplification for `Cow`. Flexibility can be regained by using newtyped slices, which is advisable for other reasons anyway. * It removes the owned type parameter from `Cow`, making the type much less verbose. * Deprecates the `is_owned` and `is_borrowed` predicates in favor of direct matching. The above API changes are relatively minor; the basic functionality remains the same, and essentially the whole module is now marked `#[stable]`. [breaking-change]
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-15/+15
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-6/+6
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18rollup merge of #22491: Gankro/into_iterAlex Crichton-9/+10
Conflicts: src/libcollections/bit.rs src/libcollections/linked_list.rs src/libcollections/vec_deque.rs src/libstd/sys/common/wtf8.rs
2015-02-18rollup merge of #22485: pnkfelix/fsk-int-uint-auditAlex Crichton-27/+27
cc #22240
2015-02-18rollup merge of #22480: alexcrichton/hashv3Alex Crichton-128/+423
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18rollup merge of #22287: Ryman/purge_carthographersAlex Crichton-5/+22
This overlaps with #22276 (I left make check running overnight) but covers a number of additional cases and has a few rewrites where the clones are not even necessary. This also implements `RandomAccessIterator` for `iter::Cloned` cc @steveklabnik, you may want to glance at this before #22281 gets the bors treatment
2015-02-18Stabilize Send/Sync.Niko Matsakis-4/+2
2015-02-18Add deprecated versions of the old markers and integrate them back into the ↵Niko Matsakis-0/+37
variance analysis.
2015-02-18WIP -- improve documentation on the phantom traitsNiko Matsakis-5/+71
2015-02-18make FromIterator use IntoIteratorAlexis-8/+9
This breaks all implementors of FromIterator, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of FromIterator should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-18make Extend use IntoIteratorAlexis-1/+1
This breaks all implementors of Extend, as they must now accept IntoIterator instead of Iterator. The fix for this is generally trivial (change the bound, and maybe call into_iter() on the argument to get the old argument). Users of Extend should be unaffected because Iterators are IntoIterator. [breaking-change]
2015-02-18std: Stabilize the `hash` moduleAlex Crichton-128/+423
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18Fallout: Port slice to use `PhantomData` instead of `ContravariantLifetime`Niko Matsakis-7/+7
2015-02-18Fallout: iter, add markers or other changes such that all type parameters ↵Niko Matsakis-5/+6
are used.
2015-02-18Fallout: AtomicPtr needs phantom data to indicate that it contains an unsafe ↵Niko Matsakis-1/+4
pointer.
2015-02-18Rewrite `Unique<T>` so that it is covariant in T, implies `NonZero` and ↵Niko Matsakis-25/+36
ownership, and also follows the API of `NonZero` a bit more closely. More to do here I think (including perhaps a new name).
2015-02-18Introduce the new phantomdata/phantomfn markers and integrate themNiko Matsakis-211/+91
into variance inference; fix various bugs in variance inference so that it considers the correct set of constraints; modify infer to consider the results of variance inference for type arguments.
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-6/+6
2015-02-18Audit `core::intrinsics` for `int`/`uint`: `size_of`/`align_of` use `usize`.Felix S. Klock II-12/+12
Likewise, `fn offset` takes an `isize`.
2015-02-18Audit `core::default` for `int`/`uint` usage.Felix S. Klock II-8/+8
* Use `i32` (`u32`) in doc examples, not `int` (`u32`). * Switch impl macros to use `isize`/`usize` rather than `int`/`uint`.
2015-02-18Audit `core::cmp` for `int/uint`.Felix S. Klock II-6/+6
* cast 3-valued `core::cmp::Ordering` to `i32`, not `int`. * use `isize`/`usize` in the impl macros.
2015-02-18Audit `core::borrow` for use of `int/uint`: use `i32` in doc example.Felix S. Klock II-1/+1
2015-02-18Avoid ptrtoint when checking if a pointer is nullBjörn Steinbrink-2/+2
Casting the pointer to an integer requires a ptrtoint, while casting 0 to a pointer is directly folded to a `null` value.
2015-02-17Register new snapshotsAlex Crichton-86/+9
2015-02-17rollup merge of #22319: huonw/send-is-not-staticAlex Crichton-0/+18
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
2015-02-17Test fixes and rebase conflictsAlex Crichton-4/+5
2015-02-17rollup merge of #22435: aturon/final-stab-threadAlex Crichton-6/+6
Conflicts: src/test/bench/rt-messaging-ping-pong.rs src/test/bench/rt-parfib.rs src/test/bench/task-perf-spawnalot.rs
2015-02-17rollup merge of #22454: alexcrichton/stabilize-into-iteratorAlex Crichton-0/+9
Now that the necessary associated types exist for the `IntoIterator` trait this commit stabilizes the trait as-is as well as all existing implementations.
2015-02-18Remove usage of .map(|&foo| foo)Kevin Butler-4/+4
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-1/+1
2015-02-18Implement RandomAccessIterator for ClonedKevin Butler-0/+17
2015-02-17Fallout from stabilizationAaron Turon-6/+6
2015-02-18Add Send implementations for `&` and `&mut`.Huon Wilson-0/+8
Per RFC 458. Closes #22251.
2015-02-18Remove the implicit `'static` bound on `Send`.Huon Wilson-0/+10
Previously Send was defined as `trait Send: 'static {}`. As detailed in https://github.com/rust-lang/rfcs/pull/458, the `'static` bound is not actually necessary for safety, we can use lifetimes to enforce that more flexibly. `unsafe` code that was previously relying on `Send` to insert a `'static` bound now may allow incorrect patterns, and so should be audited (a quick way to ensure safety immediately and postpone the audit is to add an explicit `'static` bound to any uses of the `Send` type). cc #22251.
2015-02-17std: Stabilize the IntoIterator traitAlex Crichton-0/+9
Now that the necessary associated types exist for the `IntoIterator` trait this commit stabilizes the trait as-is as well as all existing implementations.
2015-02-17Auto merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonbors-10/+10
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17Rollup merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonManish Goregaokar-10/+10
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17Rollup merge of #22364 - Manishearth:rfc-572-forbid-attr, r=nikomatsakisManish Goregaokar-0/+1
fixes #22203 r? @nikomatsakis This breaks code that might be using attributes randomly, so it's technically a [breaking-change]
2015-02-17Rollup merge of #22401 - pnkfelix:fsk-int-uint-audit, r=GankroManish Goregaokar-17/+17
cc #22240
2015-02-17Rollup merge of #22232 - alexcrichton:missing-fmt-stability, r=aturonManish Goregaokar-0/+1
The `Arguments::new_v1_formatted` function was accidentally left out when this module was stabilized.
2015-02-17Rollup merge of #22111 - robinst:option-docs-flatmap, r=steveklabnikManish Goregaokar-0/+2
Some newcomers might look for a "flatMap" method on Option. Include the reference so that searching the page would find "and_then".