| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Updated all users of HashMap, HashSet old .consume() to use .consume()
with a for loop.
Since .consume() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
|
|
merged.
|
|
|
|
|
|
|
|
|
|
Fixes Issue #7764
Running `make check` I do get a failure:
test rt::io::extensions::test::push_bytes ... ok
rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
/Users/shout/Projects/rust/src/libstd/condition.rs:50
/bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
|
|
|
|
The entire testsuite is converted to using info! rather than debug!
because some depend on the code within the debug! being trans'd.
|
|
|
|
Moves multibyte code to it's own function to make char_range_at
easier to inline, and faster for single and multibyte chars.
Benchmarked reading example.json 100 times, 1.18s before, 1.08s
after.
Also, optimize str::is_utf8 for the single and multibyte case
Before:
is_utf8_ascii: 272.355162 ms
is_utf8_multibyte: 167.337334 ms
After:
is_utf8_ascii: 218.088049 ms
is_utf8_multibyte: 134.836722 ms
|
|
Before:
is_utf8_ascii: 272.355162 ms
is_utf8_multibyte: 167.337334 ms
After:
is_utf8_ascii: 218.088049 ms
is_utf8_multibyte: 134.836722 ms
|
|
Let RingBuf have a logical name for a concrete type, and Deque is
used for the Deque trait (implemented by RingBuf and dlist).
|
|
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.
This means that instead of having to know everywhere what the type is, like
~~~
f64::sin(x)
~~~
You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num.
~~~
num::sin(x)
~~~
Note 1: If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.
Note 2: If you were using a function that corresponds to an operator, use the
operator instead.
Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
|
|
|
|
|
|
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.
If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.
Note: If you were using a function that corresponds to an operator, use
the operator instead.
|
|
|
|
|
|
consume_reverse, map_consume}.
|
|
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
|
|
|
|
|
|
|
|
|
|
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
|
|
This is the backwards-incompatible part of per-binding-site "mut".
|
|
|
|
|
|
|
|
... through yields
This avoids the following pathological scenario that makes threadring OOM:
1) task calls C using fast_ffi, borrowing a big stack from the scheduler.
2) task returns from C and places the big stack on the task-local stack segment list
3) task calls further Rust functions that require growing the stack, and for this reuses the big stack
4) task yields, failing to return the big stack to the scheduler.
5) repeat 500+ times and OOM
(reopening after incoming fallout. *do not r+*. broken)
|
|
through yields
This avoids the following pathological scenario that makes threadring OOM:
1) task calls C using fast_ffi, borrowing a big stack from the scheduler.
2) task returns from C and places the big stack on the task-local stack segment list
3) task calls further Rust functions that require growing the stack, and for this reuses the big stack
4) task yields, failing to return the big stack to the scheduler.
5) repeat 500+ times and OOM
Conflicts:
src/rt/rust_task.cpp
|
|
Finally rename finalize to drop.
Closes #4332.
|
|
|
|
|
|
complain.
|
|
|
|
|
|
format.
|
|
|
|
|
|
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
|
|
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
|
|
replaced by the `enumerate` method from std::iterator
|
|
|
|
|
|
|
|
replaced with mutable implementations of Iterator
|
|
replaced with `xs.mut_iter().enumerate()`
|