Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling up PRs in the queue #23955

Merged
merged 64 commits into from
Apr 2, 2015
Merged

Commits on Mar 5, 2015

  1. Configuration menu
    Copy the full SHA
    e05c2f8 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2015

  1. Configuration menu
    Copy the full SHA
    fb78ca8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee3dffa View commit details
    Browse the repository at this point in the history
  3. Clarified and simplified algorithm for increasing size of buffer in

    read_to_end()
    bcoopers committed Mar 29, 2015
    Configuration menu
    Copy the full SHA
    45c10db View commit details
    Browse the repository at this point in the history
  4. 80 character line limit

    bcoopers committed Mar 29, 2015
    Configuration menu
    Copy the full SHA
    2982fe3 View commit details
    Browse the repository at this point in the history
  5. Clearer wording

    bcoopers committed Mar 29, 2015
    Configuration menu
    Copy the full SHA
    8d3e559 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2015

  1. Only zero at most 64k at a time. We still use the doubling

    reallocation strategy since extend() calls reserve() and/or
    push() for us.
    bcoopers committed Mar 30, 2015
    Configuration menu
    Copy the full SHA
    240734c View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2015

  1. Configuration menu
    Copy the full SHA
    0939837 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b0edb9 View commit details
    Browse the repository at this point in the history
  3. Refactor unification interface by moving the methods off of inferctxt…

    … and onto the
    
    `UnificationTable`, and renaming/collapsing some methods.
    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    7c62640 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c581840 View commit details
    Browse the repository at this point in the history
  5. Extract more ty and infer dependencies from the unification engine

    so that it is closer to standalone.
    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    a6d9930 View commit details
    Browse the repository at this point in the history
  6. Switch to FnvHashMap

    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    e78550b View commit details
    Browse the repository at this point in the history
  7. Remove unused import

    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    e301d7c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8403b82 View commit details
    Browse the repository at this point in the history
  9. Add a "match" relation that can be used to make recursion check during

    trait matching more tailored. We now detect recursion where the
    obligations "match" -- meaning basically that they are the same for some
    substitution of any unbound type variables.
    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    cead47c View commit details
    Browse the repository at this point in the history
  10. A very simple hack to force an autoderef if the callee has type `&mut

    F`, so that if we have `x: &mut FnMut()`, then `x()` is translated to
    `FnMut::call_mut(&mut *x, ())` rather than `&mut x`. The latter would
    require `mut x: &mut FnMut()`, which is really a lot of mut. (Actually,
    the `mut` is normally required except for the special case of a `&mut F`
    reference, because that's the one case where we distinguish a unique
    path like `x` from a mutable path.)
    nikomatsakis committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    cdb10b8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    27b7841 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    11111bb View commit details
    Browse the repository at this point in the history
  13. Pretty print ids for assoc items

    nrc committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    a547962 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2015

  1. Configuration menu
    Copy the full SHA
    bfc2f5d View commit details
    Browse the repository at this point in the history
  2. Tidying up and reformatting

    nrc committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    0dd0925 View commit details
    Browse the repository at this point in the history
  3. Added Arc::try_unique

    kvark committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    39aa668 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8ded156 View commit details
    Browse the repository at this point in the history
  5. Fix rust book error-handling.md for new std::io.

    Fix example and some text for: `read_line` takes `&mut String` and return `Result` instead `IoResult`.
    kgv committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    343c110 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4b6248a View commit details
    Browse the repository at this point in the history
  7. Implement the changes to coherence such that we consider a type to be

    local only if matches `FUNDAMENTAL(LocalType)`, where `FUNDAMENTAL`
    includes `&T` and types marked as fundamental (which includes `Box`).
    Also apply these tests to negative reasoning.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    03d3ba7 View commit details
    Browse the repository at this point in the history
  8. Add #[fundamental] annotations into libcore so that Sized and the

    `Fn` traits are considered fundamental, along with `Box` (though that is
    mostly for show; the real type is `~T` in the compiler).
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    35c261a View commit details
    Browse the repository at this point in the history
  9. Update tests for new coherence rules, and add a swatch of new tests

    probing the specifics of `Fundamental`.
    
    Fixes rust-lang#23086.
    Fixes rust-lang#23516.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    b0af587 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    30b2d9e View commit details
    Browse the repository at this point in the history
  11. Fallout in libsyntax/librustc: use newtype'd options for linked lists,

    since `Option` is not fundamental and hence the old impls run afoul of
    the orphan rules.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    15b58fe View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c054ae2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    28d7693 View commit details
    Browse the repository at this point in the history
  14. rustup: Default to the beta channel

    Switches rustup to using the beta channel by default
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    63f3d7f View commit details
    Browse the repository at this point in the history
  15. Add (unstable) FnBox trait as a nicer replacement for Thunk. The doc

    comment includes a test that also shows how it can be used.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    ed63d32 View commit details
    Browse the repository at this point in the history
  16. Remove Thunk struct and Invoke trait; change Thunk to be an alias

    for `Box<FnBox()>`. I found the alias was still handy because it is
    shorter than the fully written type.
    
    This is a [breaking-change]: convert code using `Invoke` to use `FnBox`,
    which is usually pretty straight-forward. Code using thunk mostly works
    if you change `Thunk::new => Box::new` and `foo.invoke(arg)` to
    `foo(arg)`.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    cade32a View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#23066 - michaelwoerister:unreachable-if, r=…

    …pnkfelix
    
    This PR solves rust-lang#21559 by making sure that unreachable if-expressions are not further translated.
    
    Could someone who knows their way around `trans` take a look at the changes in `controlflow.rs`? I'm not sure if any other code relies on any side-effects of translating unreachable things.
    
    cc @nikomatsakis @nrc @eddyb
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    02b38a2 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#23844 - kvark:try_unique, r=alexcrichton

    While trying to implement parallel ECS processing, I stumbled upon the need to mutate `Arc` contents. The only existed method that allowed that was `make_unique`, but it has issues:
      - it may clone the data as if nothing happened, where the program may just need to crash
      - it forces `Clone` bound, which I don't have
    
    The new `try_unique` allows accessing the contents mutably without `Clone` bound and error out if the pointer is not unique.
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    1d17e6e View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#23847 - bcoopers:read_clarification, r=sfac…

    …kler
    
    This introduces no functional changes except for reducing a few unnecessary operations and variables.  Vec has the behavior that, if you request space past the capacity with reserve(), it will round up to the nearest power of 2.  What that effectively means is that after the first call to reserve(16), we are doubling our capacity every time.  So using the DEFAULT_BUF_SIZE and doubling cap_size() here is meaningless and has no effect on the call to reserve().
    
    Note that with rust-lang#23842 implemented this will hopefully have a clearer API and less of a need for commenting.  If rust-lang#23842 is not implemented then the most clear implementation would be to call reserve_exact(buf.capacity()) at every step (and making sure that buf.capacity() is not zero at the beginning of the function of course).
    
    Edit- functional change now introduced.  We will now zero 16 bytes of the vector first, then double to 32, then 64, etc. until we read 64kB.  This stops us from zeroing the entire vector when we double it, some of which may be wasted work.  Reallocation still follows the doubling strategy, but the responsibility has been moved to vec.extend(), which calls reserve() and push_back().
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    abd747c View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#23867 - nikomatsakis:issue-23086-take-3, r=…

    …pnkfelix
    
    This PR implements rust-lang/rfcs#1023. In the process it fixes rust-lang#23086 and rust-lang#23516. A few impls in libcore had to be updated, but the impact is generally pretty minimal. Most of the fallout is in the tests that probed the limits of today's coherence.
    
    I tested and we were able to build the most popular crates along with iron (modulo errors around errors being sendable).
    
    Fixes rust-lang#23918.
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    9eb0bab View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#23895 - nikomatsakis:fn-trait-inheritance-a…

    …dd-impls, r=pnkfelix
    
    The primary purpose of this PR is to add blanket impls for the `Fn` traits of the following (simplified) form:
    
        impl<F:Fn> Fn for &F
        impl<F:FnMut> FnMut for &mut F
    
    However, this wound up requiring two changes:
    
    1. A slight hack so that `x()` where `x: &mut F` is translated to `FnMut::call_mut(&mut *x, ())` vs `FnMut::call_mut(&mut x, ())`. This is achieved by just autoderef'ing one time when calling something whose type is `&F` or `&mut F`.
    2. Making the infinite recursion test in trait matching a bit more tailored. This involves adding a notion of "matching" types that looks to see if types are potentially unifiable (it's an approximation).
    
    The PR also includes various small refactorings to the inference code that are aimed at moving the unification and other code into a library (I've got that particular change in a branch, these changes just lead the way there by removing unnecessary dependencies between the compiler and the more general unification code). 
    
    Note that per rust-lang/rfcs#1023, adding impls like these would be a breaking change in the future. 
    
    cc @japaric
    cc @alexcrichton 
    cc @aturon 
    
    Fixes rust-lang#23015.
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    debac97 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#23924 - nrc:unqual-assoc3, r=alexcrichton

    Basically stuff I did for unqualified assoc types which is worth landing by itself.
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    6a3e844 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#23925 - steveklabnik:gh22914, r=Gankro

    Fixes rust-lang#22914
    
    Said issue was mostly fixed, as there wasn't any examples when it was initially posted. This is mostly just some re-wording of some things and some cleanup
    Manishearth committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    2159bbf View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    77112bb View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ec6c2c3 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    eac94fa View commit details
    Browse the repository at this point in the history
  27. Collect the definition of the Error trait into libstd for now. This

    sidesteps a coherence difficulty where `liballoc` had to prove that
    `&str: !Error`, which didn't involve any local types.
    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    19d3dab View commit details
    Browse the repository at this point in the history
  28. Re-add min_value, max_value methods

    Recent numerics stabilization removed the inherent `min_value` and
    `max_value` methods from integer types, assuming that the module-level
    constants would suffice. However, that failed to account for the use
    case in FFI code when dealing with integer type aliases.
    
    This commit reintroduces the methods as `#[stable]`, since this is
    essential functionality for 1.0.
    
    It's unfortunate to freeze these as methods, but when we can provide
    inherent associated constants these methods can be deprecated.
    aturon committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    c0f86a9 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    d81e866 View commit details
    Browse the repository at this point in the history
  30. Remove TODO

    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    8eed73f View commit details
    Browse the repository at this point in the history
  31. rustup: Fix typo in nightly

    richo authored and alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    971c355 View commit details
    Browse the repository at this point in the history
  32. Path rustdoc test

    nikomatsakis committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    3d8df31 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    232e79f View commit details
    Browse the repository at this point in the history
  34. rollup merge of rust-lang#23867: nikomatsakis/issue-23086-take-3

    This PR implements rust-lang/rfcs#1023. In the process it fixes rust-lang#23086 and rust-lang#23516. A few impls in libcore had to be updated, but the impact is generally pretty minimal. Most of the fallout is in the tests that probed the limits of today's coherence.
    
    I tested and we were able to build the most popular crates along with iron (modulo errors around errors being sendable).
    
    Fixes rust-lang#23918.
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    a3f6273 View commit details
    Browse the repository at this point in the history
  35. rollup merge of rust-lang#23933: kgv/kgv_fix

    Fix example and some text for: `read_line` takes `&mut String` and return `Result` instead `IoResult`.
    
    r? @steveklabnik
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    fd182f4 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    a3e5b35 View commit details
    Browse the repository at this point in the history
  37. rollup merge of rust-lang#23944: alexcrichton/rustup-beta

    Switches rustup to using the beta channel by default. Includes rust-lang#23824 for the implementation.
    
    cc rust-lang#20453
    Closes rust-lang#21149
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    d55ffa9 View commit details
    Browse the repository at this point in the history
  38. rollup merge of rust-lang#23947: aturon/revise-num

    Recent numerics stabilization removed the inherent `min_value` and
    `max_value` methods from integer types, assuming that the module-level
    constants would suffice. However, that failed to account for the use
    case in FFI code when dealing with integer type aliases.
    
    This commit reintroduces the methods as `#[stable]`, since this is
    essential functionality for 1.0.
    
    It's unfortunate to freeze these as methods, but when we can provide
    inherent associated constants these methods can be deprecated.
    
    r? @sfackler
    cc @alexcrichton
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    fb4029f View commit details
    Browse the repository at this point in the history
  39. std: Changing the meaning of the count to splitn

    This commit is an implementation of [RFC 979][rfc] which changes the meaning of
    the count parameter to the `splitn` function on strings and slices. The
    parameter now means the number of items that are returned from the iterator, not
    the number of splits that are made.
    
    [rfc]: rust-lang/rfcs#979
    
    Closes rust-lang#23911
    [breaking-change]
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    e98dce3 View commit details
    Browse the repository at this point in the history
  40. rollup merge of rust-lang#23951: alexcrichton/splitn

    This commit is an implementation of [RFC 979][rfc] which changes the meaning of
    the count parameter to the `splitn` function on strings and slices. The
    parameter now means the number of items that are returned from the iterator, not
    the number of splits that are made.
    
    [rfc]: rust-lang/rfcs#979
    
    Closes rust-lang#23911
    [breaking-change]
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    e9bacba View commit details
    Browse the repository at this point in the history
  41. rollup merge of rust-lang#23939: nikomatsakis/fn-box

    Conflicts:
    	src/liballoc/boxed.rs
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    9bb05fd View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    bb252a8 View commit details
    Browse the repository at this point in the history
  43. rollup merge of rust-lang#23949: aturon/stab-timeout

    This commit renames and stabilizes:
    
    * `Condvar::wait_timeout_ms` (renamed from `wait_timeout`)
    * `thread::park_timeout_ms` (renamed from `park_timeout`)
    * `thread::sleep_ms` (renamed from `sleep`)
    
    In each case, the timeout is taken as a `u32` number of milliseconds,
    rather than a `Duration`.
    
    These functions are likely to be deprecated once a stable form of
    `Duration` is available, but there is little cost to having these named
    variants around, and it's crucial functionality for 1.0.
    
    [breaking-change]
    
    r? @alexcrichton
    
    cc @sfackler @carllerche
    alexcrichton committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    655634e View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    0304e15 View commit details
    Browse the repository at this point in the history