- 27 11月, 2013 2 次提交
-
-
由 bors 提交于
It turns out that libuv was returning ENOSPC to us in our usage of the uv_ipX_name functions. It also turns out that there may be an off-by-one in libuv. For now just add one to the buffer size and handle the return value correctly. Closes #10663
-
由 Alex Crichton 提交于
It turns out that libuv was returning ENOSPC to us in our usage of the uv_ipX_name functions. It also turns out that there may be an off-by-one in libuv. For now just add one to the buffer size and handle the return value correctly. Closes #10663
-
- 26 11月, 2013 25 次提交
-
-
由 bors 提交于
-
由 bors 提交于
This moves the locking/waiting methods to returning an RAII struct instead of relying on closures. Additionally, this changes the methods to all take '&mut self' to discourage recursive locking. The new method to block is to call `wait` on the returned RAII structure instead of calling it on the lock itself (this enforces that the lock is held). At the same time, this improves the Mutex interface a bit by allowing destruction of non-initialized members and by allowing construction of an empty mutex (nothing initialized inside).
-
由 bors 提交于
This PR removes almost all `_iter` suffixes in various APIs of the codebase that return Iterators, as discussed in #9440. As a summarize for the intend behind this PR: - Iterators are the recommended way to provide a potentially lazy list of values, no need to name them painfully verbose. If anything, functions that return a specific container type should have more verbose names. - We have a static type system, so no need to encode the return value of a constructor function into its name. Following is a possibly incomplete list of all renamings I performed in the codebase. For a few of them I'm a bit unsure whether the new name still properly expresses their functionality, so feedback would be welcome: ~~~ &str : word_iter() -> words() line_iter() -> lines() any_line_iter() -> lines_any() iter() -> chars() char_offset_iter() -> char_indices() byte_iter() -> bytes() split_iter() -> split() splitn_iter() -> splitn() split_str_iter() -> split_str() split_terminator_iter() -> split_terminator() matches_index_iter() -> match_indices() nfd_iter() -> nfd_chars() nfkd_iter() -> nfkd_chars() &[T] : split_iter() -> split() splitn_iter() -> splitn() window_iter() -> windows() chunk_iter() -> chunks() permutations_iter() -> permutations() extra:bitv::Bitv : rev_liter() -> rev_iter() common_iter() -> commons() outlier_iter() -> outliers() extra::treemap::{...} : lower_bound_iter() -> lower_bound() upper_bound_iter() -> upper_bound() std::trie::{...} : bound_iter() -> bound() lower_bound_iter() -> lower_bound() upper_bound_iter() -> upper_bound() rustpkg::package_id::{...} : prefixes_iter() -> prefixes() std::hashmap::{...} : difference_iter() -> difference() symmetric_difference_iter() -> symmetric_difference() intersection_iter() -> intersection() union_iter() -> union() std::path::{posix, windows} : component_iter() -> components() str_component_iter() -> str_components() ... not showing all identical renamings for reverse versions ~~~ --- I'm also planning a few more changes, like removing all unnecessary `_rev` constructors (#9391), or reducing the `split` variants on `&str` to a more versatile and concise system.
-
由 Marvin Löbel 提交于
-
由 Vijay Korapaty 提交于
-
由 bors 提交于
This patchset fixes some parts broken on Win64. This also adds `--disable-pthreads` flags to llvm on mingw-w64 archs (both 32-bit and 64-bit, not mingw) due to bad performance. See #8996 for discussion.
-
由 bors 提交于
This patchset makes warning if crate-level attribute is used at other places, obsolete attributed is used, or unknown attribute is used, since they are usually from mistakes. Closes #3348
-
由 klutzy 提交于
-
由 klutzy 提交于
-
由 klutzy 提交于
-
由 klutzy 提交于
-
由 bors 提交于
This is needed so that the FFI works as expected on platforms that don't flatten aggregates the way the AMD64 ABI does, especially for `#[repr(C)]`. This moves more of `type_of` into `trans::adt`, because the type might or might not be an LLVM struct. Closes #10308.
-
由 klutzy 提交于
-
由 klutzy 提交于
This also enables two tests properly.
-
由 klutzy 提交于
This also moves `#[auto_{en,de}code]` checker from syntax to lint.
-
由 klutzy 提交于
-
由 Jed Davis 提交于
-
由 Alex Crichton 提交于
This moves the locking/waiting methods to returning an RAII struct instead of relying on closures. Additionally, this changes the methods to all take '&mut self' to discourage recursive locking. The new method to block is to call `wait` on the returned RAII structure instead of calling it on the lock itself (this enforces that the lock is held). At the same time, this improves the Mutex interface a bit by allowing destruction of non-initialized members and by allowing construction of an empty mutex (nothing initialized inside).
-
由 bors 提交于
Without this the assert in <tt>rust_malloc_ip6_addr</tt> is triggered as it expects a correctly formatted IPv6 address.
-
由 bors 提交于
Implement various traits (IterBytes and extra's Encodable and Decodable) for Rc<T> when T alreay implements the trait.
-
由 bors 提交于
-
由 Léo Testard 提交于
-
由 Léo Testard 提交于
Add an implementation of Encodable and Decodable for Rc. This will be needed to use Rc in place of @ in libsyntax.
-
由 Seo Sanghyeon 提交于
-
由 bors 提交于
-
- 25 11月, 2013 13 次提交
-
-
由 bors 提交于
We want a 1000 element array, not a 2 element array
-
由 Seo Sanghyeon 提交于
-
由 Seo Sanghyeon 提交于
-
由 bors 提交于
This is a behavioral difference in libuv between different platforms in different situations. It turns out that libuv on windows will immediately allocate a buffer instead of waiting for data to be ready. What this implies is that we must have our custom data set on the handle before we call uv_read_start. I wish I knew of a way to test this, but this relies to being on the windows platform *and* reading from a true TTY handle which only happens when this is actually attached to a terminal. I have manually verified this works. Closes #10645
-
由 Daniel Micay 提交于
-
由 bors 提交于
Closes #10623
-
由 bors 提交于
-
由 bors 提交于
Fixes #3614.
-
由 Huon Wilson 提交于
Fixes #3614.
-
由 Steven Fackler 提交于
We want a 1000 element array, not a 2 element array
-
由 bors 提交于
Currently, the parser doesn't give any context when it finds an unclosed delimiter and it's not EOF. Report the most recent unclosed delimiter, to help the user along. Closes #10636
-
由 bors 提交于
This is both useful for performance (otherwise logging is unbuffered), but also useful for correctness. Because when a task is destroyed we can't block the task waiting for the logger to close, loggers are opened with a 'CloseAsynchronously' specification. This causes libuv do defer the call to close() until the next turn of the event loop. If you spin in a tight loop around printing, you never yield control back to the libuv event loop, meaning that you simply enqueue a large number of close requests but nothing is actually closed. This queue ends up never getting closed, meaning that if you keep trying to create handles one will eventually fail, which the runtime will attempt to print the failure, causing mass destruction. Caching will provide better performance as well as prevent creation of too many handles. Closes #10626
-
由 Jed Davis 提交于
This is needed so that the FFI works as expected on platforms that don't flatten aggregates the way the AMD64 ABI does, especially for `#[repr(C)]`. This moves more of `type_of` into `trans::adt`, because the type might or might not be an LLVM struct.
-