1. 03 1月, 2015 17 次提交
    • A
      rollup merge of #20391: daramos/utf8_lossy · c5b9ffde
      Alex Crichton 提交于
      Prior to 9bae6ec8 from_utf8_lossy had a minor optimization in place that avoided having to loop from the beginning of the input slice.
      Recently 4908017d implemented Utf8Error::InvalidByte which makes this possible again.
      c5b9ffde
    • A
      rollup merge of #20388: brson/install-tweaks · e80b9811
      Alex Crichton 提交于
      r? @alexcrichton
      e80b9811
    • A
      rollup merge of #20386: frewsxcv/rm-reexports · 9ca8076c
      Alex Crichton 提交于
      Part of #19253
      
      [breaking-change]
      9ca8076c
    • A
      rollup merge of #20385: nick29581/x-object · 073fd5be
      Alex Crichton 提交于
      Closes #19056
      073fd5be
    • A
      rollup merge of #20380: dcrewi/fix-make-install · 3cf1992c
      Alex Crichton 提交于
      There seems to be a problem introduced by
      8b3c6769 that causes "make install"
      to fail when the build is not configured to skip doc building.
      3cf1992c
    • A
      rollup merge of #20334: nagisa/ffi-llvm · b9a26bf4
      Alex Crichton 提交于
      Fixes #20313
      
      r? @huonw
      b9a26bf4
    • A
      rollup merge of #20227: FlashYoshi/patch-1 · 656d5bbb
      Alex Crichton 提交于
      656d5bbb
    • A
      rollup merge of #19625: mrhota/guide_traits · 5bd7a78f
      Alex Crichton 提交于
      Nothing major. Clarification, copy-editing, typographical and grammatical consistency
      5bd7a78f
    • A
      rollup merge of #20354: alexcrichton/second-pass-thread_local · 4b0e084a
      Alex Crichton 提交于
      Conflicts:
      	src/libstd/sys/common/thread_info.rs
      4b0e084a
    • A
      rollup merge of #20315: alexcrichton/std-sync · 009ec5d2
      Alex Crichton 提交于
      Conflicts:
      	src/libstd/rt/exclusive.rs
      	src/libstd/sync/barrier.rs
      	src/libstd/sys/unix/pipe.rs
      	src/test/bench/shootout-binarytrees.rs
      	src/test/bench/shootout-fannkuch-redux.rs
      009ec5d2
    • A
      0101bbe7
    • A
      rollup merge of #20382: alexcrichton/isuse-20376 · faf53559
      Alex Crichton 提交于
      faf53559
    • A
      rollup merge of #20377: alexcrichton/issue-20352 · 074996d6
      Alex Crichton 提交于
      074996d6
    • A
      rollup merge of #20273: alexcrichton/second-pass-comm · 8b7d0320
      Alex Crichton 提交于
      Conflicts:
      	src/doc/guide.md
      	src/libcollections/bit.rs
      	src/libcollections/btree/node.rs
      	src/libcollections/slice.rs
      	src/libcore/ops.rs
      	src/libcore/prelude.rs
      	src/librand/rand_impls.rs
      	src/librustc/middle/check_match.rs
      	src/librustc/middle/infer/region_inference/mod.rs
      	src/librustc_driver/lib.rs
      	src/librustdoc/test.rs
      	src/libstd/bitflags.rs
      	src/libstd/io/comm_adapters.rs
      	src/libstd/io/mem.rs
      	src/libstd/io/mod.rs
      	src/libstd/io/net/pipe.rs
      	src/libstd/io/net/tcp.rs
      	src/libstd/io/net/udp.rs
      	src/libstd/io/pipe.rs
      	src/libstd/io/process.rs
      	src/libstd/io/stdio.rs
      	src/libstd/io/timer.rs
      	src/libstd/io/util.rs
      	src/libstd/macros.rs
      	src/libstd/os.rs
      	src/libstd/path/posix.rs
      	src/libstd/path/windows.rs
      	src/libstd/prelude/v1.rs
      	src/libstd/rand/mod.rs
      	src/libstd/rand/os.rs
      	src/libstd/sync/barrier.rs
      	src/libstd/sync/condvar.rs
      	src/libstd/sync/future.rs
      	src/libstd/sync/mpsc/mod.rs
      	src/libstd/sync/mpsc/mpsc_queue.rs
      	src/libstd/sync/mpsc/select.rs
      	src/libstd/sync/mpsc/spsc_queue.rs
      	src/libstd/sync/mutex.rs
      	src/libstd/sync/once.rs
      	src/libstd/sync/rwlock.rs
      	src/libstd/sync/semaphore.rs
      	src/libstd/sync/task_pool.rs
      	src/libstd/sys/common/helper_thread.rs
      	src/libstd/sys/unix/process.rs
      	src/libstd/sys/unix/timer.rs
      	src/libstd/sys/windows/c.rs
      	src/libstd/sys/windows/timer.rs
      	src/libstd/sys/windows/tty.rs
      	src/libstd/thread.rs
      	src/libstd/thread_local/mod.rs
      	src/libstd/thread_local/scoped.rs
      	src/libtest/lib.rs
      	src/test/auxiliary/cci_capture_clause.rs
      	src/test/bench/shootout-reverse-complement.rs
      	src/test/bench/shootout-spectralnorm.rs
      	src/test/compile-fail/array-old-syntax-2.rs
      	src/test/compile-fail/bind-by-move-no-guards.rs
      	src/test/compile-fail/builtin-superkinds-self-type.rs
      	src/test/compile-fail/comm-not-freeze-receiver.rs
      	src/test/compile-fail/comm-not-freeze.rs
      	src/test/compile-fail/issue-12041.rs
      	src/test/compile-fail/unsendable-class.rs
      	src/test/run-pass/builtin-superkinds-capabilities-transitive.rs
      	src/test/run-pass/builtin-superkinds-capabilities-xc.rs
      	src/test/run-pass/builtin-superkinds-capabilities.rs
      	src/test/run-pass/builtin-superkinds-self-type.rs
      	src/test/run-pass/capturing-logging.rs
      	src/test/run-pass/closure-bounds-can-capture-chan.rs
      	src/test/run-pass/comm.rs
      	src/test/run-pass/core-run-destroy.rs
      	src/test/run-pass/drop-trait-enum.rs
      	src/test/run-pass/hashmap-memory.rs
      	src/test/run-pass/issue-13494.rs
      	src/test/run-pass/issue-3609.rs
      	src/test/run-pass/issue-4446.rs
      	src/test/run-pass/issue-4448.rs
      	src/test/run-pass/issue-8827.rs
      	src/test/run-pass/issue-9396.rs
      	src/test/run-pass/ivec-tag.rs
      	src/test/run-pass/rust-log-filter.rs
      	src/test/run-pass/send-resource.rs
      	src/test/run-pass/send-type-inference.rs
      	src/test/run-pass/sendable-class.rs
      	src/test/run-pass/spawn-types.rs
      	src/test/run-pass/task-comm-0.rs
      	src/test/run-pass/task-comm-10.rs
      	src/test/run-pass/task-comm-11.rs
      	src/test/run-pass/task-comm-13.rs
      	src/test/run-pass/task-comm-14.rs
      	src/test/run-pass/task-comm-15.rs
      	src/test/run-pass/task-comm-16.rs
      	src/test/run-pass/task-comm-3.rs
      	src/test/run-pass/task-comm-4.rs
      	src/test/run-pass/task-comm-5.rs
      	src/test/run-pass/task-comm-6.rs
      	src/test/run-pass/task-comm-7.rs
      	src/test/run-pass/task-comm-9.rs
      	src/test/run-pass/task-comm-chan-nil.rs
      	src/test/run-pass/task-spawn-move-and-copy.rs
      	src/test/run-pass/task-stderr.rs
      	src/test/run-pass/tcp-accept-stress.rs
      	src/test/run-pass/tcp-connect-timeouts.rs
      	src/test/run-pass/tempfile.rs
      	src/test/run-pass/trait-bounds-in-arc.rs
      	src/test/run-pass/trivial-message.rs
      	src/test/run-pass/unique-send-2.rs
      	src/test/run-pass/unique-send.rs
      	src/test/run-pass/unwind-resource.rs
      8b7d0320
    • A
      rollup merge of #20157: alexcrichton/issue-20068 · 5696ea58
      Alex Crichton 提交于
      5696ea58
    • S
      Properly deal with Ordering in the guide · 76e3bc23
      Steve Klabnik 提交于
      Now that it's been removed from the prelude, we need to treat things differently.
      
      Fixes #17967
      76e3bc23
    • A
      std: Stabilize the prelude module · 56290a00
      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
      56290a00
  2. 02 1月, 2015 18 次提交
    • B
      auto merge of #20356 : Gankro/rust/stab, r=aturon · 71b46b18
      bors 提交于
      This stabilizes most of libcollections, carefully avoiding sections of API which are being managed in other PRs. APIs which are not stable are marked explicitly unstable with a reason.
      
      Deprecates:
      
      * DList
        * rotate_forward
        * rotate_backward
        * prepend
        * insert_when
        * insert_ordered
        * merge
      
      * VecMap
        * update
        * update_with_key
      
      * Renames and newtypes the Bitv and BitvSet iterators to match conventions.
      
      * Removes the Copy impl from DList's Iter.
      
      as such this is a
      
      [breaking-change]
      71b46b18
    • B
      auto merge of #20412 : nikomatsakis/rust/assoc-types, r=aturon · 1f887c8c
      bors 提交于
      These changes fix various problems encountered getting japaric's `at-iter` branch to work. This branch converts the `Iterator` trait to use an associated type.
      1f887c8c
    • A
      std: Second pass stabilization for `boxed` · f2ccdfd8
      Alex Crichton 提交于
      This commit performs a second pass over the `std::boxed` module, taking the
      following actions:
      
      * `boxed` is now stable
      * `Box` is now stable
      * `BoxAny` is removed in favor of a direct `impl Box<Any>`
      * `Box::downcast` remains unstable while the name of the `downcast` family of
        methods is determined.
      
      This is a breaking change due to the removal of the `BoxAny` trait (note that
      the `downcast` method still exists), and existing consumers of `BoxAny` simply
      need to remove the import in their modules.
      
      [breaking-change]
      f2ccdfd8
    • 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
    • B
      auto merge of #20189 : cmr/rust/i32-fallback, r=nikomatsakis · ee3c5957
      bors 提交于
      Doesn't yet converge on a fixed point, but generally works. A better algorithm
      will come with the implementation of default type parameter fallback.
      
      If inference fails to determine an exact integral or floating point type, it
      will set the type to i32 or f64, respectively.
      
      Closes #16968
      ee3c5957
    • B
      auto merge of #20387 : nick29581/rust/arrays-2, r=alexcrichton · cd614164
      bors 提交于
      Closes #19999
      cd614164
    • N
      Replace the TODO with a FIXME. · 345e38cc
      Niko Matsakis 提交于
      345e38cc
    • N
    • N
      Refactor the Typer interface to separate out UnboxedClosureTyper methods, which are · 78f848cd
      Niko Matsakis 提交于
      the only things that trait selection needs.
      78f848cd
    • N
      Normalize predicates found on the impl · 7092af7e
      Niko Matsakis 提交于
      7092af7e
    • B
      mk: Put the version number somewhere discoverable in the installer · d5391496
      Brian Anderson 提交于
      The binaries for some release channels to not contain the version number,
      which makes it hard for scripts to determine the version number.
      d5391496
    • C
      Implement numeric fallback · 53ece715
      Corey Richardson 提交于
      Doesn't yet converge on a fixed point, but generally works. A better algorithm
      will come with the implementation of default type parameter fallback.
      
      If inference fails to determine an exact integral or floating point type, it
      will set the type to i32 or f64, respectively.
      
      Closes #16968
      53ece715
    • N
      More fallout · 2c92dded
      Nick Cameron 提交于
      2c92dded
    • N
      Add tests · 13392d19
      Nick Cameron 提交于
      13392d19
    • N
      Fallout - change array syntax to use `;` · 7e2b9ea2
      Nick Cameron 提交于
      7e2b9ea2
    • N
      Accept ranges with only a maximum value: `..expr` · 57a74eda
      Nick Cameron 提交于
      57a74eda
    • N
      Disallow [_, ..n] syntax for fixed length arrays and repeating array constructors · d45b5d2e
      Nick Cameron 提交于
      Closes #19999
      
      [breaking-change]
      
      Use [_; n] instead.
      d45b5d2e
  3. 01 1月, 2015 5 次提交
    • B
      auto merge of #20190 : cmr/rust/gate-macro-args, r=alexcrichton · 39d74026
      bors 提交于
      Uses the same approach as https://github.com/rust-lang/rust/pull/17286 (and
      subsequent changes making it more correct), where the visitor will skip any
      pieces of the AST that are from "foreign code", where the spans don't line up,
      indicating that that piece of code is due to a macro expansion.
      
      If this breaks your code, read the error message to determine which feature
      gate you should add to your crate.
      
      Closes #18102
      
      [breaking-change]
      39d74026
    • C
      Feature gate macro arguments · 41da99df
      Corey Richardson 提交于
      Uses the same approach as https://github.com/rust-lang/rust/pull/17286 (and
      subsequent changes making it more correct), where the visitor will skip any
      pieces of the AST that are from "foreign code", where the spans don't line up,
      indicating that that piece of code is due to a macro expansion.
      
      If this breaks your code, read the error message to determine which feature
      gate you should add to your crate, and bask in the knowledge that your code
      won't mysteriously break should you try to use the 1.0 release.
      
      Closes #18102
      
      [breaking-change]
      41da99df
    • B
      auto merge of #19388 : nick29581/rust/rc-show, r=alexcrichto · c594959c
      bors 提交于
      r? @huonw or @alexcrichton
      
      Apparently, we have previously rejected an RFC like this. However, since then we removed `{:?}` and so without this debugging gets really difficult as soon as there is a RefCell anywhere, so I believe there is more benefit to adding these impls than there was before. By using "try_borrow" we can avoid panicing in `Show` (I think).
      
      @ huon in response to a comment in #19254: I noticed that `drop()` checks for the ptr being null, so I checked here too. Now I am checking for both, if you're confident I can change to only checking `strong()`.
      c594959c
    • D
      Reimplement a minor optimization in String::from_utf8_lossy that avoids having... · 8aeefbbf
      dan@daramos.com 提交于
      Reimplement a minor optimization in String::from_utf8_lossy that avoids having to loop the slice from the begining.
      8aeefbbf
    • N
      Reviewer change · f0976e2c
      Nick Cameron 提交于
      f0976e2c