1. 19 8月, 2014 1 次提交
  2. 14 8月, 2014 2 次提交
    • B
      Fix test fallout · fce442e7
      Brian Anderson 提交于
      fce442e7
    • B
      std: Rename various slice traits for consistency · 4f5b6927
      Brian Anderson 提交于
      ImmutableVector -> ImmutableSlice
      ImmutableEqVector -> ImmutableEqSlice
      ImmutableOrdVector -> ImmutableOrdSlice
      MutableVector -> MutableSlice
      MutableVectorAllocating -> MutableSliceAllocating
      MutableCloneableVector -> MutableCloneableSlice
      MutableOrdVector -> MutableOrdSlice
      
      These are all in the prelude so most code will not break.
      
      [breaking-change]
      4f5b6927
  3. 24 7月, 2014 1 次提交
    • B
      collections: Move push/pop to MutableSeq · d36a8f3f
      Brian Anderson 提交于
      Implement for Vec, DList, RingBuf. Add MutableSeq to the prelude.
      
      Since the collections traits are in the prelude most consumers of
      these methods will continue to work without change.
      
      [breaking-change]
      d36a8f3f
  4. 22 7月, 2014 1 次提交
  5. 10 7月, 2014 1 次提交
  6. 30 6月, 2014 1 次提交
  7. 12 6月, 2014 1 次提交
    • A
      rustc: Remove ~[T] from the language · 3316b1eb
      Alex Crichton 提交于
      The following features have been removed
      
      * box [a, b, c]
      * ~[a, b, c]
      * box [a, ..N]
      * ~[a, ..N]
      * ~[T] (as a type)
      * deprecated_owned_vector lint
      
      All users of ~[T] should move to using Vec<T> instead.
      3316b1eb
  8. 06 6月, 2014 2 次提交
    • A
      Fallout from the libcollections movement · 760b93ad
      Alex Crichton 提交于
      760b93ad
    • A
      std: Recreate a `collections` module · 6a585375
      Alex Crichton 提交于
      As with the previous commit with `librand`, this commit shuffles around some
      `collections` code. The new state of the world is similar to that of librand:
      
      * The libcollections crate now only depends on libcore and liballoc.
      * The standard library has a new module, `std::collections`. All functionality
        of libcollections is reexported through this module.
      
      I would like to stress that this change is purely cosmetic. There are very few
      alterations to these primitives.
      
      There are a number of notable points about the new organization:
      
      * std::{str, slice, string, vec} all moved to libcollections. There is no reason
        that these primitives shouldn't be necessarily usable in a freestanding
        context that has allocation. These are all reexported in their usual places in
        the standard library.
      
      * The `hashmap`, and transitively the `lru_cache`, modules no longer reside in
        `libcollections`, but rather in libstd. The reason for this is because the
        `HashMap::new` contructor requires access to the OSRng for initially seeding
        the hash map. Beyond this requirement, there is no reason that the hashmap
        could not move to libcollections.
      
        I do, however, have a plan to move the hash map to the collections module. The
        `HashMap::new` function could be altered to require that the `H` hasher
        parameter ascribe to the `Default` trait, allowing the entire `hashmap` module
        to live in libcollections. The key idea would be that the default hasher would
        be different in libstd. Something along the lines of:
      
            // src/libstd/collections/mod.rs
      
            pub type HashMap<K, V, H = RandomizedSipHasher> =
                  core_collections::HashMap<K, V, H>;
      
        This is not possible today because you cannot invoke static methods through
        type aliases. If we modified the compiler, however, to allow invocation of
        static methods through type aliases, then this type definition would
        essentially be switching the default hasher from `SipHasher` in libcollections
        to a libstd-defined `RandomizedSipHasher` type. This type's `Default`
        implementation would randomly seed the `SipHasher` instance, and otherwise
        perform the same as `SipHasher`.
      
        This future state doesn't seem incredibly far off, but until that time comes,
        the hashmap module will live in libstd to not compromise on functionality.
      
      * In preparation for the hashmap moving to libcollections, the `hash` module has
        moved from libstd to libcollections. A previously snapshotted commit enables a
        distinct `Writer` trait to live in the `hash` module which `Hash`
        implementations are now parameterized over.
      
        Due to using a custom trait, the `SipHasher` implementation has lost its
        specialized methods for writing integers. These can be re-added
        backwards-compatibly in the future via default methods if necessary, but the
        FNV hashing should satisfy much of the need for speedier hashing.
      
      A list of breaking changes:
      
      * HashMap::{get, get_mut} no longer fails with the key formatted into the error
        message with `{:?}`, instead, a generic message is printed. With backtraces,
        it should still be not-too-hard to track down errors.
      
      * The HashMap, HashSet, and LruCache types are now available through
        std::collections instead of the collections crate.
      
      * Manual implementations of hash should be parameterized over `hash::Writer`
        instead of just `Writer`.
      
      [breaking-change]
      6a585375
  9. 25 5月, 2014 1 次提交
  10. 23 5月, 2014 2 次提交
  11. 07 5月, 2014 1 次提交
    • A
      core: Inherit possible string functionality · 9bae6ec8
      Alex Crichton 提交于
      This moves as much allocation as possible from teh std::str module into
      core::str. This includes essentially all non-allocating functionality, mostly
      iterators and slicing and such.
      
      This primarily splits the Str trait into only having the as_slice() method,
      adding a new StrAllocating trait to std::str which contains the relevant new
      allocation methods. This is a breaking change if any of the methods of "trait
      Str" were overriden. The old functionality can be restored by implementing both
      the Str and StrAllocating traits.
      
      [breaking-change]
      9bae6ec8
  12. 03 5月, 2014 1 次提交
  13. 25 4月, 2014 1 次提交
    • A
      Update libuv · 58a51120
      Alex Crichton 提交于
      This update brings a few months of changes, but primarily a fix for the
      following situation.
      
      When creating a handle to stdin, libuv used to set the stdin handle to
      nonblocking mode. This would end up affect this stdin handle across all
      processes that shared it, which mean that stdin become nonblocking for everyone
      using the same stdin. On linux, this also affected *stdout* because stdin/stdout
      roughly point at the same thing.
      
      This problem became apparent when running the test suite manually on a local
      computer. The stdtest suite (running with libgreen) would set stdout to
      nonblocking mode (as described above), and then the next test suite would always
      fail for a printing failure (because stdout was returning EAGAIN).
      
      This has been fixed upstream, joyent/libuv@342e8c, and this update pulls in this
      fix. This also brings us in line with a recently upstreamed libuv patch.
      
      Closes #13336
      Closes #13355
      58a51120
  14. 19 4月, 2014 2 次提交
    • R
      Replace all ~"" with "".to_owned() · 919889a1
      Richo Healey 提交于
      919889a1
    • A
      std: Make ~[T] no longer a growable vector · 7d3b0bf3
      Alex Crichton 提交于
      This removes all resizability support for ~[T] vectors in preparation of DST.
      The only growable vector remaining is Vec<T>. In summary, the following methods
      from ~[T] and various functions were removed. Each method/function has an
      equivalent on the Vec type in std::vec unless otherwise stated.
      
      * slice::OwnedCloneableVector
      * slice::OwnedEqVector
      * slice::append
      * slice::append_one
      * slice::build (no replacement)
      * slice::bytes::push_bytes
      * slice::from_elem
      * slice::from_fn
      * slice::with_capacity
      * ~[T].capacity()
      * ~[T].clear()
      * ~[T].dedup()
      * ~[T].extend()
      * ~[T].grow()
      * ~[T].grow_fn()
      * ~[T].grow_set()
      * ~[T].insert()
      * ~[T].pop()
      * ~[T].push()
      * ~[T].push_all()
      * ~[T].push_all_move()
      * ~[T].remove()
      * ~[T].reserve()
      * ~[T].reserve_additional()
      * ~[T].reserve_exect()
      * ~[T].retain()
      * ~[T].set_len()
      * ~[T].shift()
      * ~[T].shrink_to_fit()
      * ~[T].swap_remove()
      * ~[T].truncate()
      * ~[T].unshift()
      * ~str.clear()
      * ~str.set_len()
      * ~str.truncate()
      
      Note that no other API changes were made. Existing apis that took or returned
      ~[T] continue to do so.
      
      [breaking-change]
      7d3b0bf3
  15. 16 4月, 2014 1 次提交
  16. 11 4月, 2014 2 次提交
  17. 10 4月, 2014 1 次提交
  18. 03 4月, 2014 1 次提交
  19. 01 4月, 2014 1 次提交
  20. 20 3月, 2014 1 次提交
  21. 28 2月, 2014 2 次提交
  22. 22 2月, 2014 2 次提交
    • E
      std: rewrite Hash to make it more generic · d223dd1e
      Erick Tryzelaar 提交于
      This patch merges IterBytes and Hash traits, which clears up the
      confusion of using `#[deriving(IterBytes)]` to support hashing.
      Instead, it now is much easier to use the new `#[deriving(Hash)]`
      for making a type hashable with a stream hash.
      
      Furthermore, it supports custom non-stream-based hashers, such as
      if a value's hash was cached in a database.
      
      This does not yet replace the old IterBytes-hash with this new
      version.
      d223dd1e
    • B
      Reduce reliance on `to_str_radix` · 6943acd1
      Brendan Zabarauskas 提交于
      This is in preparation to remove the implementations of ToStrRadix in integers, and to remove the associated logic from `std::num::strconv`.
      
      The parts that still need to be liberated are:
      
      - `std::fmt::Formatter::runplural`
      - `num::{bigint, complex, rational}`
      6943acd1
  23. 04 2月, 2014 1 次提交
    • A
      std: Remove io::io_error · ece8a8f5
      Alex Crichton 提交于
      * All I/O now returns IoResult<T> = Result<T, IoError>
      * All formatting traits now return fmt::Result = IoResult<()>
      * The if_ok!() macro was added to libstd
      ece8a8f5
  24. 21 1月, 2014 1 次提交
  25. 05 1月, 2014 1 次提交
  26. 18 12月, 2013 1 次提交
    • A
      Don't allow impls to force public types · eabf11b9
      Alex Crichton 提交于
      This code in resolve accidentally forced all types with an impl to become
      public. This fixes it by default inheriting the privacy of what was previously
      there and then becoming `true` if nothing else exits.
      
      Closes #10545
      eabf11b9
  27. 12 12月, 2013 1 次提交
  28. 08 12月, 2013 1 次提交
  29. 27 11月, 2013 1 次提交
  30. 20 11月, 2013 1 次提交
  31. 12 11月, 2013 1 次提交
  32. 28 10月, 2013 1 次提交
  33. 22 10月, 2013 1 次提交