summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-04-02Auto merge of #23868 - mbrubeck:doc-edit, r=Manishearth 1.0.0-betabors-6/+6
r? @steveklabnik
2015-04-02Auto merge of #23822 - tanadeau:remove-box-syntax-in-pointers-doc, ↵bors-84/+103
r=steveklabnik This is the first use of `box`. It's an unstable feature and also isn't consistent with the use of `Box` in the "original" code above it. r? @steveklabnik
2015-04-02Tweak relese notes + rebase fixesAlex Crichton-22/+48
2015-04-01Moved use of `box_syntax` unstable feature in docs to Unstable section.Trent Nadeau-84/+103
Create a new section under the Unstable section for `box` syntax and patterns and removed their discussion from the Pointers section.
2015-04-01Test fixes and rebase conflicts, round 2Alex Crichton-64/+29
2015-04-01rollup merge of #23176: huonw/rm-boundsAlex Crichton-36/+38
2015-04-01rollup merge of #23860: nikomatsakis/copy-requires-cloneAlex Crichton-583/+624
Conflicts: src/test/compile-fail/coherence-impls-copy.rs
2015-04-01rollup merge of #23953: dhuseby/masterAlex Crichton-2/+2
@alexcrichton here are the two most recent Bitrig snapshots. As usual, please upload the snapshots to the snapshot server: https://github.com/dhuseby/rust-cross-bitrig/blob/master/snapshots/rust-stage0-2015-03-25-a923278-bitrig-x86_64-e56c400a04bca7b52ab54e0780484bb68fa449c2.tar.bz2 https://github.com/dhuseby/rust-cross-bitrig/blob/master/snapshots/rust-stage0-2015-03-27-5520801-bitrig-x86_64-55a69b0ae5481ccda54c2fcfc54025a0945c4f57.tar.bz2 BTW, I was just able to get the Bitrig Rust build to pass "make check" so I'll submit a PR once this lands to fix the tests and get the Bitrig buildbot to finally complete a build. That will hopefully end this nonsense of hand building and uploading snapshots. :+1:
2015-04-01rollup merge of #23945: pnkfelix/gate-u-negateAlex Crichton-48/+146
Feature-gate unsigned unary negate. Discussed in weekly meeting here: https://github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2015-03-31.md#feature-gate--expr and also in the internals thread here: http://internals.rust-lang.org/t/forbid-unsigned-integer/752
2015-04-02Test fixes and rebase conflicts, round 2Alex Crichton-17/+19
Conflicts: src/libcore/num/mod.rs
2015-04-02fixes for fallout in tests/compile-failFelix S. Klock II-0/+6
2015-04-02partial set of fixes for fallout in tests/run-passFelix S. Klock II-8/+10
2015-04-01Test fixes and rebase conflicts, round 1Alex Crichton-3/+8
2015-04-01Fix bug in `OverflowOps` impl for unsigned integers.Felix S. Klock II-3/+49
Namely, the special case treatment for `div`/`rem` is only applicable to signed integer values. Clearly RFC 1027 would have saved us here! ;)
2015-04-01rollup merge of #23949: aturon/stab-timeoutAlex Crichton-28/+54
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
2015-04-01rollup merge of #23948: nikomatsakis/feature-gate-rust-abiAlex Crichton-7/+37
Like it says. r? @alexcrichton
2015-04-01fix typo.Felix S. Klock II-1/+1
2015-04-01manually adding the last two bitrig snapshotsDave Huseby-2/+2
2015-04-01Stabilize basic timeout functionalityAaron Turon-28/+54
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]
2015-04-01removed impls of `Neg` for `u{8,16,32,64,size}`.Felix S. Klock II-1/+1
2015-04-01fallout when bootstrapping `rustc`.Felix S. Klock II-9/+19
2015-04-01fallout from feature-gating unary negation on unsigned integers.Felix S. Klock II-11/+27
2015-04-01added unary_negate feature gate.Felix S. Klock II-0/+16
2015-04-01rollup merge of #23939: nikomatsakis/fn-boxAlex Crichton-85/+124
Conflicts: src/liballoc/boxed.rs
2015-04-01rollup merge of #23951: alexcrichton/splitnAlex Crichton-66/+85
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]: https://github.com/rust-lang/rfcs/pull/979 Closes #23911 [breaking-change]
2015-04-01std: Changing the meaning of the count to splitnAlex Crichton-66/+85
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]: https://github.com/rust-lang/rfcs/pull/979 Closes #23911 [breaking-change]
2015-04-01rollup merge of #23947: aturon/revise-numAlex Crichton-0/+20
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
2015-04-01rollup merge of #23944: alexcrichton/rustup-betaAlex Crichton-8/+19
Switches rustup to using the beta channel by default. Includes #23824 for the implementation. cc #20453 Closes #21149
2015-04-01rollup merge of #23942: vhbit/ios-randAlex Crichton-2/+2
2015-04-01rollup merge of #23933: kgv/kgv_fixAlex Crichton-6/+7
Fix example and some text for: `read_line` takes `&mut String` and return `Result` instead `IoResult`. r? @steveklabnik
2015-04-01rollup merge of #23867: nikomatsakis/issue-23086-take-3Alex Crichton-157/+175
This PR implements rust-lang/rfcs#1023. In the process it fixes #23086 and #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 #23918.
2015-04-01rollup merge of #23568: steveklabnik/closure_docsAlex Crichton-137/+401
[rendered](https://github.com/steveklabnik/rust/blob/closure_docs/src/doc/trpl/closures.md) r? @nikomatsakis
2015-04-01Path rustdoc testNiko Matsakis-0/+3
2015-04-01rustup: Fix typo in nightlyRicho Healey-1/+1
2015-04-01Remove TODONiko Matsakis-1/+1
2015-04-01Feature gate rust-call ABI.Niko Matsakis-7/+34
2015-04-01Fix enum timezone across all platforms.Niko Matsakis-5/+5
2015-04-01Re-add min_value, max_value methodsAaron Turon-0/+20
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.
2015-04-01Collect the definition of the `Error` trait into `libstd` for now. ThisNiko Matsakis-157/+175
sidesteps a coherence difficulty where `liballoc` had to prove that `&str: !Error`, which didn't involve any local types.
2015-04-01Re-write closures chapterSteve Klabnik-137/+401
2015-04-02Rollup merge of #23932 - steveklabnik:doc_std_path, r=flaper87Manish Goregaokar-0/+213
2015-04-02Rollup merge of #23927 - frewsxcv:patch-7, r=ManishearthManish Goregaokar-4/+2
2015-04-02Rollup merge of #23925 - steveklabnik:gh22914, r=GankroManish Goregaokar-12/+6
Fixes #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
2015-04-02Rollup merge of #23924 - nrc:unqual-assoc3, r=alexcrichtonManish Goregaokar-124/+171
Basically stuff I did for unqualified assoc types which is worth landing by itself.
2015-04-02Rollup merge of #23895 - nikomatsakis:fn-trait-inheritance-add-impls, r=pnkfelixManish Goregaokar-1270/+1627
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 #23015.
2015-04-02Rollup merge of #23867 - nikomatsakis:issue-23086-take-3, r=pnkfelixManish Goregaokar-227/+808
This PR implements rust-lang/rfcs#1023. In the process it fixes #23086 and #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 #23918.
2015-04-02Rollup merge of #23847 - bcoopers:read_clarification, r=sfacklerManish Goregaokar-8/+4
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 #23842 implemented this will hopefully have a clearer API and less of a need for commenting. If #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().
2015-04-02Rollup merge of #23844 - kvark:try_unique, r=alexcrichtonManish Goregaokar-6/+50
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.
2015-04-02Rollup merge of #23066 - michaelwoerister:unreachable-if, r=pnkfelixManish Goregaokar-2/+128
This PR solves #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
2015-04-01Remove `Thunk` struct and `Invoke` trait; change `Thunk` to be an aliasNiko Matsakis-93/+56
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)`.