| Age | Commit message (Collapse) | Author | Lines |
|
2b96408 r=sanxiyn
documents conversion, size hints and double-ended iterators and adds
more of the traits to the prelude
|
|
|
|
Fix #2551.
Lint is off by default because I didn't bother to fix all of std and extra.
|
|
This changes it from
```
left: true does not equal right: false
```
to
```
assertion failed: `(left == right) && (right == left)` (left: `true`, right: `false`)
```
|
|
cc #6004 and #3273
This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats:
1. Changing `local_set` to not require `@` is blocked on #7673
2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it...
The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed.
This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
|
|
|
|
Closes #6004
|
|
|
|
Closes #6221
|
|
excepttheweasel/rust/mut_default_param_list_issue_7483, r=pcwalton
|
|
|
|
|
|
d3be8ab r=brson
05eb3cf r=thestinger
c80f4e1 r=huonw
8c27af1 r=huonw
0eee0b6 r=cmr
ea2756a r=thestinger
|
|
|
|
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.
|
|
- also removed redundant assignment to is_mutbl
- updated copyright
|
|
|
|
r=catamorphism
Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc.
Fixes #3224.
Fixes #3225.
Fixes #3255.
Fixes #6225.
Fixes #6386.
r? @catamorphism
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
In an ideal world, the AST would be completely sendable, this gets us a step closer.
It removes the local heap allocations for `view_item`, `Path`, `Lifetime` `trait_ref` `OptVec<TyParamBounds>` and `Ty`. There are also a few other smaller changes I made as things went along.
|
|
|
|
|
|
|
|
Also, makes the pretty-printer use & instead of @ as much as possible,
which will help with later changes, though in the interim has produced
some... interesting constructs.
|
|
|
|
|
|
|
|
Fixes #7276
|
|
Change the signature of Iterator.size_hint() to always have a lower bound.
Implement .size_hint() on all remaining iterators (if it differs from the default).
|
|
Add size_hint() to the Iterators in libextra and the Iterator in
libsyntax.
Skip deque for the moment, as it's being worked on elsewhere.
|
|
|
|
|
|
|
|
Fixes #7276
|
|
iterators.
|
|
consume_reverse, map_consume}.
|
|
|
|
Continuation of #7430.
I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
|
|
|
|
strings
|
|
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
|
|
|
|
|
|
|