Commit graph

21129 commits

Author SHA1 Message Date
Graydon Hoare
9b9250052c Merge pull request #8479 from catamorphism/derived-errors
rustc: Eliminate a derived error in check::_match
2013-08-14 18:23:55 -07:00
Tim Chevalier
63083ee767 rustc: Eliminate a derived error in check::_match 2013-08-14 13:42:58 -07:00
bors
e7b572952c auto merge of #8469 : gifnksm/rust/tutorial-ja, r=graydon
This PR adds an Japanese translated version of `doc/tutorial.md`.
Other tutorials have not yet translated.
2013-08-14 13:05:22 -07:00
bors
0a677bcf6e auto merge of #8462 : thestinger/rust/loop-cleanup, r=cmr
I missed some of this in e7bb33aed8. Hopefully it's all gone now :).
2013-08-14 10:35:12 -07:00
bors
927aff1724 auto merge of #8452 : Kimundi/rust/stuff02, r=bstrie
- Methodyfied the string ascii extionsion functions - They got added recently, I wrapped them in a trait.
- Added `into_owned()` method for vectors - similar to `Str`'s `into_owned()` function, allows to convert to a owned vector without making a copy if the source is a owned vector.
- Added `or_some` method to option - similar to `unwrap_or_default`, but keeps the values wrapped in an `Option`. Useful for `Option` chains, eg Iterator impls.
- Added `DoubleEndedIterator` impl to `Option` - Just for compatibility with generic Iterator functions.
- Renamed nil.rs to unit.rs - the type got renamed ages ago, it's time the source file is as well.
2013-08-14 08:35:15 -07:00
bors
836a3d9bdb auto merge of #8453 : dmanescu/rust/8451, r=cmr
I'm not sure that the supplied tests are suitable.
2013-08-14 06:44:18 -07:00
Marvin Löbel
a00becd0eb Methodyfied the string ascii extionsion functions
Added into_owned() method for vectors
Added DoubleEnded Iterator impl to Option
Renamed nil.rs to unit.rs
2013-08-14 14:48:25 +02:00
bors
ac49e65611 auto merge of #8440 : sfackler/rust/env-fix, r=pcwalton
The type of the result of option_env! was not fully specified in the
None case, leading to type check failures in the case where the variable
was not defined (e.g. option_env!("FOO").is_none()).

Also cleaned up some compilation warnings.
2013-08-14 04:41:20 -07:00
bors
cd656c74f6 auto merge of #8439 : huonw/rust/hashset-clone, r=cmr
Closes #5581.
2013-08-14 02:38:19 -07:00
bors
0efbb25a26 auto merge of #8477 : catamorphism/rust/issue-4096, r=msullivan
r? @msullivan ...e parameters

In this case, it's likely to be that the user forgot the `self` type, so
say so.

Closes #4096
2013-08-13 23:59:18 -07:00
bors
e86d414f22 auto merge of #8497 : nikomatsakis/rust/improvements-to-object-coercion, r=pcwalton
While looking over the code for object coercion, I realized that it wasn't quite handling freezing and reborrowing correctly. Tweak the code, adding tests for the relevant cases. 

r? @pcwalton
2013-08-13 21:29:20 -07:00
bors
7585b34d31 auto merge of #8446 : alexcrichton/rust/ifmt++, r=graydon
This includes a number of improvements to `ifmt!`

* Implements formatting arguments -- `{:0.5x}` works now
* Formatting now works on all integer widths, not just `int` and `uint`
* Added a large doc block to `std::fmt` which should help explain what `ifmt!` is all about
* Added floating point formatters, although they have the same pitfalls from before (they're just proof-of-concept now)

Closed a couple of issues along the way, yay! Once this gets into a snapshot, I'll start looking into removing all of `fmt`
2013-08-13 19:23:21 -07:00
Alex Crichton
36882b3d54 Add f formats to ifmt!
Currently the work just the same as the old `extfmt` versions
2013-08-13 19:16:40 -07:00
bors
433fbe8fcf auto merge of #8329 : michaelwoerister/rust/lexical_scopes_alt, r=graydon
This pull request re-implements handling of visibility scopes and source code positions in debug info. It should now be very stable and properly handle

+ variable shadowing
+ expanded code (macros and the new for-loop de-sugaring, for example)
+ variables in the middle of nested scopes
+ bindings declared in the head of match statement arms. 

all of which did not work at all or did not work reliably before. Those interested in a more detailed description of the problems at hand, I kindly refer to http://michaelwoerister.github.io/2013/08/03/visibility-scopes.html

Why doesn't the `populate_scope_map()` function use `syntax::visit`?
Because it would not improve this particular AST walker (see: 69dc790849 (commitcomment-3781426))

Cheers,
Michael
2013-08-13 16:53:14 -07:00
bors
9f379329db auto merge of #8475 : kmcallister/rust/stack_segment, r=brson,brson
Servo needs to tell SpiderMonkey about the stack bounds.

r? @brson
2013-08-13 14:57:24 -07:00
Graydon Hoare
26fd428fae Merge pull request #8432 from chris-morgan/remove-assert-eq-macro-fail-binary
Remove in-tree test binary.
2013-08-13 14:51:36 -07:00
Niko Matsakis
bf2d3c840b Reborrow even when passing &Object to &Object, so as to permit freezing 2013-08-13 15:52:05 -04:00
Niko Matsakis
afb20775d1 Fix freezing of @mut Objects when passing as argument 2013-08-13 15:52:04 -04:00
Keegan McAllister
4fd5318594 Make rt::stack public
Fixes #8478.
2013-08-13 09:10:07 -07:00
bors
0d817ee869 auto merge of #8423 : alexcrichton/rust/less-priv-again, r=bstrie
Closes #5495
2013-08-13 07:26:23 -07:00
bors
f02cc6bf0a auto merge of #8411 : bblum/rust/assorted-fixes, r=brson
Each commit is pretty much what it says on the tin. r anybody.
2013-08-13 04:59:20 -07:00
bors
c99b2b932f auto merge of #7866 : sstewartgallus/rust/clean, r=cmr
Mostly I did simple transformations from imperative style loops to
more functional iterator based transformations.
2013-08-13 02:14:24 -07:00
Michael Woerister
983cc777c5 debuginfo: Add some tests for visibiliy scopes within closures. 2013-08-13 11:13:49 +02:00
Michael Woerister
9c7d9eb6fd debuginfo: Add support for argument shadowing. 2013-08-13 11:13:49 +02:00
Michael Woerister
33e7d95e9c debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
bors
4601ea65f8 auto merge of #8487 : brson/rust/local-opts, r=brson
I did this once but acciddentally undid it in a later patch.
2013-08-12 23:56:26 -07:00
Alex Crichton
930885d5e5 Forbid pub/priv where it has no effect
Closes #5495
2013-08-12 23:20:46 -07:00
Alex Crichton
27b4d104c8 Explain what ifmt! is all about 2013-08-12 23:18:51 -07:00
Alex Crichton
1f6afa887b Correct the padding on integer types for formatting 2013-08-12 23:18:51 -07:00
Alex Crichton
6feb58ed84 Define integer formats for all widths
Closes #1653
2013-08-12 23:18:51 -07:00
Alex Crichton
b820748ff5 Implement formatting arguments for strings and integers
Closes #1651
2013-08-12 23:18:51 -07:00
Brian Anderson
95badabaaf std: Re-optimize tls access on local allocation path
I did this once but acciddentally undid it in a later patch.
2013-08-12 22:30:32 -07:00
bors
44675ac6af auto merge of #8476 : thestinger/rust/snapshot, r=brson 2013-08-12 20:29:22 -07:00
bors
d9492d72ba auto merge of #8450 : alexcrichton/rust/nopt-changes, r=graydon
Since the new runtime landed, the *-nopt builders have increased cycle time by roughly an hour. I have a feeling that this is because the entire runtime is in rust and it's not being optimized at all. In that past with an optimized C++ runtime it looks like things ran faster.

This adds the ability to disable optimizations in tests only, not for the entire compiler. This means that the entire compiler and associated libraries will be built with optimizations, but the tests themselves would be built and run without optimizations.

This isn't quite as good of a guarantee as disabling optimizations everywhere, but hopefully it'll improve cycle time for the *-nopt builds to move the queue along faster.
2013-08-12 17:59:19 -07:00
bors
59da4e0bc9 auto merge of #8419 : cmr/rust/fix-rtdebug, r=brson
It now actually does logging, and is compiled out when `--cfg rtdebug` is not
given to the libstd build, which it isn't by default. This makes the rt
benchmarks 18-50% faster.
2013-08-12 15:28:49 -07:00
Tim Chevalier
db2d9caeda rustc: Give a hint when a static method call has fewer than expected type parameters
In this case, it's likely to be that the user forgot the `self` type, so
say so.

Closes #4096
2013-08-12 14:42:27 -07:00
Daniel Micay
0cb0ef2ca5 fix build with the new snapshot compiler 2013-08-12 17:37:46 -04:00
Daniel Micay
8b502d60ab register snapshots 2013-08-12 17:37:42 -04:00
Keegan McAllister
2145de8c8f rt::task: Make current_stack_segment public
Servo needs to tell SpiderMonkey about the stack bounds.
2013-08-12 13:54:40 -07:00
Ben Blum
5ac8c57bd4 Clean up transitionary glue in task/spawn.rs. Don't hold kill-little-lock for O(n) time, cf #3100, and optimize out several unneeded clone()s. 2013-08-12 15:20:02 -04:00
bors
35040275b3 auto merge of #8400 : blake2-ppc/rust/seq-ord, r=cmr
Use Eq + Ord for lexicographical ordering of sequences.

For each of <, <=, >= or > as R, use::

    [x, ..xs] R [y, ..ys]  =  if x != y { x R y } else { xs R ys }

Previous code using `a < b` and then `!(b < a)` for short-circuiting
fails on cases such as  [1.0, 2.0] < [0.0/0.0, 3.0], where the first
element was effectively considered equal.

Containers like &[T] did also implement only one comparison operator `<`,
and derived the comparison results from this. This isn't correct either for
Ord.

Implement functions in `std::iterator::order::{lt,le,gt,ge,equal,cmp}` that all
iterable containers can use for lexical order.

We also visit tuple ordering, having the same problem and same solution
(but differing implementation).
2013-08-12 11:53:18 -07:00
Ben Blum
ce48e71d28 Fix select() in light of the deschedule...and then race. Close #8347. 2013-08-12 13:54:21 -04:00
Ben Blum
31f9b51592 Make cell with_ref/with_mut_ref use finally. Close #7975. 2013-08-12 13:54:21 -04:00
Ben Blum
c8c09d40fc Reorganise Select traits to not expose internal runtime types. Close #5160. Pending #8215. 2013-08-12 13:54:21 -04:00
Ben Blum
ee5cfb0c2d Don't use unkillable in UnsafeArc dtor when there's no unwrapper. Close #8382. 2013-08-12 13:19:17 -04:00
gifnksm
8e1440c7d4 tutorial: Add Japanese translation 2013-08-13 00:26:49 +09:00
bors
59434a1b8c auto merge of #8429 : catamorphism/rust/rustpkg-docs, r=catamorphism 2013-08-12 08:17:14 -07:00
gifnksm
e4cfb1d0f5 doc: Generate .po files for Japanse translations 2013-08-12 22:39:31 +09:00
gifnksm
2bc8a9be77 doc: Update .pot files 2013-08-12 22:39:31 +09:00
gifnksm
7b1b7f3210 doc: Add -M and -L option to po4a 2013-08-12 22:39:31 +09:00