- 27 3月, 2014 9 次提交
-
-
由 Corey Richardson 提交于
We really do *not* want TCO to kick in. If it does, we'll never blow the stack, and never trigger the condition the test is checking for. To that end, do a meaningless alloc that serves only to get a destructor to run. The addition of nocapture/noalias seems to have let LLVM do more TCO, which hurt this testcase.
-
由 Corey Richardson 提交于
-
由 Corey Richardson 提交于
Closes #6751
-
由 bors 提交于
This change prepares `rustc` to accept private fields by default. These changes will have to go through a snapshot before the rest of the changes can happen.
-
由 bors 提交于
Add some docs to ExpnInfo. Add a single overlooked `new_span` call to the folder (I'm pretty sure nothing reads this span, though, so it's probably pointless).
-
由 bors 提交于
Close #13057
-
由 Alex Crichton 提交于
This change is in preparation for #8122. Nothing is currently done with these visibility qualifiers, they are just parsed and accepted by the compiler. RFC: 0004-private-fields
-
由 Alex Crichton 提交于
This is a necessary change in preparation for switching the defaults as part of #8122. RFC: 0004-private-fields
-
由 bors 提交于
I touched up the documentation from @pcwalton found in #12952.
-
- 26 3月, 2014 19 次提交
-
-
由 Huon Wilson 提交于
This was leaving Decls without the new spans; this is a minor change, since literally nothing reads in the code base reads the span of a Decl itself, always just its contents.
-
由 Huon Wilson 提交于
-
由 bors 提交于
Apparently we had forgotten to do this for freebsd, causing possible problems on FreeBSD 10. The discussion in #12324 has some more details about how it's missing.
-
由 bors 提交于
The libuv fs wrappers are very thin wrappers around the syscalls they correspond to, and a notable worrisome case is the write syscall. This syscall is not guaranteed to write the entire buffer provided, so we may have to continue calling uv_fs_write if a short write occurs. Closes #13130
-
由 bors 提交于
This can be done now that logging has been moved out and libnative is the default (not libgreen)
-
由 bors 提交于
# Summary Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by value. These functions always exhaust the passed `Iterator`, and are often used for transferring the values of a new `Iterator` directly into a data structure, so using them usually require the use of the `&mut` operator: ``` foo.extend(&mut bar.move_iter()); // Transfer content from bar into foo let mut iter = ...; foo.extend(&mut iter); // iter is now empty ``` This patch changes both the `FromIterator` and `Extendable` traits to take the iterator by value instead, which makes the common case of using these traits less heavy: ``` foo.extend(bar.move_iter()); // Transfer content from bar into foo let iter = ...; foo.extend(iter); // iter is now inaccessible if it moved // or unchanged if it was Pod and copied. ``` # Composability This technically makes the traits less flexible from a type system pov, because they now require ownership. However, because `Iterator` provides the `ByRef` adapter, there is no loss of functionality: ``` foo.extend(iter.by_ref()); // Same semantic as today, for the few situations where you need it. ``` # Motivation This change makes it less painful to use iterators for shuffling values around between collections, which makes it more acceptable to always use them for this, enabling more flexibility. For example, `foo.extend(bar.move_iter())` can generally be the fastest way to append an collections content to another one, without both needing to have the same type. Making this easy to use would allow the removal of special cased methods like `push_all()` on vectors. (See https://github.com/mozilla/rust/issues/12456) I opened https://github.com/mozilla/rust/issues/13038 as well, to discuss this change in general if people object to it. # Further work This didn't change the `collect()` method to take by value `self`, nor any of the other adapters that also exhaust their iterator argument. For consistency this should probably happen in the long term, but for now this is too much trouble, as every use of them would need to be checked for accidentally changed semantic by going `&mut self -> self`. (which allows for the possibility that a `Pod` iterator got copied instead of exhausted without generating a type error by the change)
-
由 bors 提交于
* Include tip given by Leo Testard in mailing list about labeled `break` and `continue`: https://mail.mozilla.org/pipermail/rust-dev/2014-March/009145.html * cross-reference named lifetimes in tutorial -> lifetimes guide * Broke named lifetimes section into two sub-sections. * Added mention of `'static` lifetime.
-
由 bors 提交于
-
由 Brian Anderson 提交于
-
由 bors 提交于
Rendered form available at http://docs.octayn.net/doc/ This moves derived impls to the bottom of the list, separate from the rest, and collapses default methods that aren't overridden into an expandible accordion.
-
由 Marvin Löbel 提交于
-
由 Corey Richardson 提交于
-
由 Corey Richardson 提交于
-
由 Corey Richardson 提交于
-
由 bors 提交于
std: expand the `Share` docs to make them more precise. And give some examples about exactly what's `Share` and what's not.
-
由 Alex Crichton 提交于
These are mostly touchups from the previous commit.
-
由 Patrick Walton 提交于
* native::io * std::char * std::fmt * std::fmt::parse * std::io * std::io::extensions * std::io::net::ip * std::io::net::udp * std::io::net::unix * std::io::pipe * std::num * std::num::f32 * std::num::f64 * std::num::strconv * std::os
-
由 Alex Crichton 提交于
Apparently we had forgotten to do this for freebsd, causing possible problems on FreeBSD 10. The discussion in #12324 has some more details about how it's missing.
-
由 Alex Crichton 提交于
The libuv fs wrappers are very thin wrappers around the syscalls they correspond to, and a notable worrisome case is the write syscall. This syscall is not guaranteed to write the entire buffer provided, so we may have to continue calling uv_fs_write if a short write occurs. Closes #13130
-
- 25 3月, 2014 12 次提交
-
-
由 bors 提交于
Cleanup old issue references. One of these workarounds no longer need to be used anymore and the others are out of date.
-
由 Huon Wilson 提交于
And give some examples about exactly what's `Share` and what's not.
-
由 bors 提交于
It was possible to borrow unsafe static items in static initializers. This patch implements a small `Visitor` that walks static initializer's expressions and checks borrows aliasability. Fixes #13005 cc @nikomatsakis r?
-
由 bors 提交于
Several things here: * Cleanup * Fix build targets for building .pkg so that it works and works for all hosts * Adds support for nightly artifacts * Put docs in a location suitable for upload to s3 during 'make dist' * Add coverage of unix binary installers to 'distcheck' * Fix 'distcheck' * Change 'dist' to build source tarballs, binary tarballs and OS X packages
-
由 bors 提交于
This commit contains an implementation of synchronous, bounded channels for Rust. This is an implementation of the proposal made last January [1]. These channels are built on mutexes, and currently focus on a working implementation rather than speed. Receivers for sync channels have select() implemented for them, but there is currently no implementation of select() for sync senders. Rust will continue to provide both synchronous and asynchronous channels as part of the standard distribution, there is no intent to remove asynchronous channels. This flavor of channels is meant to provide an alternative to asynchronous channels because like green tasks, asynchronous channels are not appropriate for all situations. [1] - https://mail.mozilla.org/pipermail/rust-dev/2014-January/007924.html
-
由 Alex Crichton 提交于
This commit contains an implementation of synchronous, bounded channels for Rust. This is an implementation of the proposal made last January [1]. These channels are built on mutexes, and currently focus on a working implementation rather than speed. Receivers for sync channels have select() implemented for them, but there is currently no implementation of select() for sync senders. Rust will continue to provide both synchronous and asynchronous channels as part of the standard distribution, there is no intent to remove asynchronous channels. This flavor of channels is meant to provide an alternative to asynchronous channels because like green tasks, asynchronous channels are not appropriate for all situations. [1] - https://mail.mozilla.org/pipermail/rust-dev/2014-January/007924.html
-
由 bors 提交于
* Remove clone-ability from all primitives. All shared state will now come from the usage of the primitives being shared, not the primitives being inherently shareable. This allows for fewer allocations for stack-allocated primitives. * Add `Mutex<T>` and `RWLock<T>` which are stack-allocated primitives for purely wrapping a piece of data * Remove `RWArc<T>` in favor of `Arc<RWLock<T>>` * Remove `MutexArc<T>` in favor of `Arc<Mutex<T>>` * Shuffle around where things are located * The `arc` module now only contains `Arc` * A new `lock` module contains `Mutex`, `RWLock`, and `Barrier` * A new `raw` module contains the primitive implementations of `Semaphore`, `Mutex`, and `RWLock` * The Deref/DerefMut trait was implemented where appropriate * `CowArc` was removed, the functionality is now part of `Arc` and is tagged with `#[experimental]`. * The crate now has #[deny(missing_doc)] * `Arc` now supports weak pointers This is not a large-scale rewrite of the functionality contained within the `sync` crate, but rather a shuffling of who does what an a thinner hierarchy of ownership to allow for better composability.
-
由 Brian Anderson 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
This updates the exports and layout of the crate
-
由 Alex Crichton 提交于
This removes the now-outdated MutexArc and RWArc types. These are superseded by Arc<Mutex<T>> and Arc<RWLock<T>>. The only remaining arc is the one true Arc. Additionally, the arc now has weak pointers implemented for it to assist in breaking cycles. This commit brings the arc api up to parity with the sibling Rc api, making them nearly interchangeable for inter and intra task communication.
-
由 Steven Stewart-Gallus 提交于
-