1. 03 1月, 2015 4 次提交
  2. 02 1月, 2015 4 次提交
    • A
      std: Enforce Unicode in fmt::Writer · e423fcf0
      Alex Crichton 提交于
      This commit is an implementation of [RFC 526][rfc] which is a change to alter
      the definition of the old `fmt::FormatWriter`. The new trait, renamed to
      `Writer`, now only exposes one method `write_str` in order to guarantee that all
      implementations of the formatting traits can only produce valid Unicode.
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md
      
      One of the primary improvements of this patch is the performance of the
      `.to_string()` method by avoiding an almost-always redundant UTF-8 check. This
      is a breaking change due to the renaming of the trait as well as the loss of the
      `write` method, but migration paths should be relatively easy:
      
      * All usage of `write` should move to `write_str`. If truly binary data was
        being written in an implementation of `Show`, then it will need to use a
        different trait or an altogether different code path.
      
      * All usage of `write!` should continue to work as-is with no modifications.
      
      * All usage of `Show` where implementations just delegate to another should
        continue to work as-is.
      
      [breaking-change]
      
      Closes #20352
      e423fcf0
    • A
      std: Second pass stabilization of sync · f3a7ec70
      Alex Crichton 提交于
      This pass performs a second pass of stabilization through the `std::sync`
      module, avoiding modules/types that are being handled in other PRs (e.g.
      mutexes, rwlocks, condvars, and channels).
      
      The following items are now stable
      
      * `sync::atomic`
      * `sync::atomic::ATOMIC_BOOL_INIT` (was `INIT_ATOMIC_BOOL`)
      * `sync::atomic::ATOMIC_INT_INIT` (was `INIT_ATOMIC_INT`)
      * `sync::atomic::ATOMIC_UINT_INIT` (was `INIT_ATOMIC_UINT`)
      * `sync::Once`
      * `sync::ONCE_INIT`
      * `sync::Once::call_once` (was `doit`)
        * C == `pthread_once(..)`
        * Boost == `call_once(..)`
        * Windows == `InitOnceExecuteOnce`
      * `sync::Barrier`
      * `sync::Barrier::new`
      * `sync::Barrier::wait` (now returns a `bool`)
      * `sync::Semaphore::new`
      * `sync::Semaphore::acquire`
      * `sync::Semaphore::release`
      
      The following items remain unstable
      
      * `sync::SemaphoreGuard`
      * `sync::Semaphore::access` - it's unclear how this relates to the poisoning
                                    story of mutexes.
      * `sync::TaskPool` - the semantics of a failing task and whether a thread is
                           re-attached to a thread pool are somewhat unclear, and the
                           utility of this type in `sync` is question with respect to
                           the jobs of other primitives. This type will likely become
                           stable or move out of the standard library over time.
      * `sync::Future` - futures as-is have yet to be deeply re-evaluated with the
                         recent core changes to Rust's synchronization story, and will
                         likely become stable in the future but are unstable until
                         that time comes.
      
      [breaking-change]
      f3a7ec70
    • N
      More fallout · 2c92dded
      Nick Cameron 提交于
      2c92dded
    • N
      Fallout - change array syntax to use `;` · 7e2b9ea2
      Nick Cameron 提交于
      7e2b9ea2
  3. 01 1月, 2015 3 次提交
  4. 31 12月, 2014 7 次提交
    • A
      Fallout from stabilization · 6abfac08
      Aaron Turon 提交于
      6abfac08
    • A
      Register new snapshots · 262c1efe
      Alex Crichton 提交于
      262c1efe
    • A
      Stabilize cmp · b94bcbf5
      Aaron Turon 提交于
      This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as
      `#[stable]`, as well as the majorify of manual implementaitons of these
      traits. The traits match the [reform
      RFC](https://github.com/rust-lang/rfcs/pull/439).
      
      Along the way, two changes are made:
      
      * The recently-added type parameters for `Ord` and `Eq` are
        removed. These were mistakenly added while adding them to `PartialOrd`
        and `PartialEq`, but they don't make sense given the laws that are
        required for (and use cases for) `Ord` and `Eq`.
      
      * More explicit laws are added for `PartialEq` and `PartialOrd`,
        connecting them to their associated mathematical concepts.
      
      In the future, many of the impls should be generalized; see
      since generalizing later is not a breaking change.
      
      [breaking-change]
      b94bcbf5
    • A
      Adjustments from review · 6e1879ea
      Aaron Turon 提交于
      6e1879ea
    • A
      Second pass stabilization: slice · 4f863a33
      Aaron Turon 提交于
      This commit takes a second pass through the `slice` module to
      stabilize its API. The changes are as follows:
      
      **Stable**:
      
      * `as_mut_slice`
      * `as_ptr`, `as_mut_ptr`
      * `binary_search_by` (was: `binary_search`)
      * `binary_search` (was: `binary_search_elem`)
      * `chunks`, `chunks_mut`
      * `contains`
      * `ends_with`
      * `first`, `first_mut` (was: `head`)
      * `get_unchecked`, `get_unchecked_mut` (was: `unsafe_get`)
      * `get`
      * `is_empty`
      * `iter`, `iter_mut`
      * `len`
      * `reverse`
      * `sort_by`
      * `sort`
      * `split_at`, `split_at_mut`
      * `split_mut`, `splitn_mut`, `rsplitn_mut`
      * `split`, `splitn`, `rsplitn`
      * `starts_with`
      * `swap`
      * `to_vec`
      * `windows`
      
      **Deprecated**:
      
      * `head`, `head_mut` (renamed as above)
      * `unsafe_get`, `unsafe_mut` (renamed as above)
      * `binary_search_elem` (renamed as above)
      * `partitioned`, deprecated in favor of a new, more
        general iterator consumer called `partition`.
      * `BinarySearchResult`, deprecated in favor of `Result<uint, uint>`
      
      [breaking-change]
      4f863a33
    • A
      std::iter: Add partition and unzip methods to iterators · 8a5057af
      Aaron Turon 提交于
      8a5057af
    • C
      Remove core::atomic::Ordering::* public reexport · 1d26fb9e
      Corey Farwell 提交于
      Part of #19253
      
      [breaking-change]
      1d26fb9e
  5. 30 12月, 2014 7 次提交
    • H
      Implement `Clone` for a large number of iterators & other adaptors. · b7832ed0
      Huon Wilson 提交于
      It's useful to be able to save state.
      b7832ed0
    • N
      Fallout from mut slices · 3bf40568
      Nick Cameron 提交于
      3bf40568
    • N
      Remove ExprSlice by hacking the compiler · 4e2afb00
      Nick Cameron 提交于
      [breaking-change]
      
      The `mut` in slices is now redundant. Mutability is 'inferred' from position. This means that if mutability is only obvious from the type, you will need to use explicit calls to the slicing methods.
      4e2afb00
    • N
      Add hypothetical support for ranges with only an upper bound · ed8f5039
      Nick Cameron 提交于
      Note that this doesn't add the surface syntax.
      ed8f5039
    • A
      std: Second pass stabilization for `ptr` · 54452cdd
      Alex Crichton 提交于
      This commit performs a second pass for stabilization over the `std::ptr` module.
      The specific actions taken were:
      
      * The `RawPtr` trait was renamed to `PtrExt`
      * The `RawMutPtr` trait was renamed to `MutPtrExt`
      * The module name `ptr` is now stable.
      * These functions were all marked `#[stable]` with no modification:
        * `null`
        * `null_mut`
        * `swap`
        * `replace`
        * `read`
        * `write`
        * `PtrExt::is_null`
        * `PtrExt::offset`
      * These functions remain unstable:
        * `as_ref`, `as_mut` - the return value of an `Option` is not fully expressive
                               as null isn't the only bad value, and it's unclear
                               whether we want to commit to these functions at this
                               time. The reference/lifetime semantics as written are
                               also problematic in how they encourage arbitrary
                               lifetimes.
        * `zero_memory` - This function is currently not used at all in the
                          distribution, and in general it plays a broader role in the
                          "working with unsafe pointers" story. This story is not yet
                          fully developed, so at this time the function remains
                          unstable for now.
        * `read_and_zero` - This function remains unstable for largely the same
                            reasons as `zero_memory`.
      * These functions are now all deprecated:
        * `PtrExt::null` - call `ptr::null` or `ptr::null_mut` instead.
        * `PtrExt::to_uint` - use an `as` expression instead.
        * `PtrExt::is_not_null` - use `!p.is_null()` instead.
      54452cdd
    • S
      Implement Send for Cell and RefCell · 88d4e02d
      Steven Fackler 提交于
      Also get rid of NoSync markers since UnsafeCell is now not Sync
      88d4e02d
    • A
      std: Stabilize the prelude module · c32d03f4
      Alex Crichton 提交于
      This commit is an implementation of [RFC 503][rfc] which is a stabilization
      story for the prelude. Most of the RFC was directly applied, removing reexports.
      Some reexports are kept around, however:
      
      * `range` remains until range syntax has landed to reduce churn.
      * `Path` and `GenericPath` remain until path reform lands. This is done to
        prevent many imports of `GenericPath` which will soon be removed.
      * All `io` traits remain until I/O reform lands so imports can be rewritten all
        at once to `std::io::prelude::*`.
      
      This is a breaking change because many prelude reexports have been removed, and
      the RFC can be consulted for the exact list of removed reexports, as well as to
      find the locations of where to import them.
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
      [breaking-change]
      
      Closes #20068
      c32d03f4
  6. 29 12月, 2014 6 次提交
  7. 28 12月, 2014 1 次提交
  8. 27 12月, 2014 5 次提交
  9. 26 12月, 2014 2 次提交
  10. 24 12月, 2014 1 次提交