Commit Graph

21351 Commits

Author SHA1 Message Date
Brian Anderson
88d8baa76b std::rt: Fix a race in UvRemoteCallback's dtor that misses callbacks
Full description in comments.
2013-08-16 16:37:09 -07:00
Brian Anderson
bd382ee643 std::rt: Touch up idle logic 2013-08-16 16:37:09 -07:00
toddaaro
066ca17eaa an attempt at a singleton pausible idle callback for each scheduler. suffers from nondeterministic deadlock and also pending scheduler messages on scheduler shutdown. 2013-08-16 16:37:09 -07:00
Alex Crichton
22c7bbfd0c Delegate {} to Default instead of Poly
By using a separate trait this is overridable on a per-type basis and makes room
for the possibility of even more arguments passed in for the future.
2013-08-16 16:09:33 -07:00
Alex Crichton
109274426a Implement {:s} for ~str and @str as well 2013-08-16 16:09:33 -07:00
Kevin Ballard
0450cde37b Remove obsolete error message regarding do-blocks with internal iters
When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you

    error: Do-block body must return bool, but returns () here. Perhaps
    you meant to write a `for`-loop?

This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message

    error: mismatched types: expected `bool` but found `()`
2013-08-16 14:12:06 -07:00
Michael Woerister
80fb2f2056 debuginfo: Added test cases for static struct and enum methods. 2013-08-16 22:30:43 +02:00
Michael Woerister
5abb7c3a67 debuginfo: Test cases for [generic][default][static] methods and functions:
* closure-in-generic-function
* generic-functions-nested
* generic-method-on-generic-struct
* generic-trait-generic-static-default-method
* method-on-generic-struct
* self-in-generic-default-method
* trait-generic-static-default-method

Also, fixed an 'unused variable' warning in debuginfo.rs
2013-08-16 22:30:43 +02:00
Michael Woerister
0e7808c2e0 debuginfo: Support for combinations of Self type and type parameters. 2013-08-16 22:30:43 +02:00
Michael Woerister
024d644c68 debuginfo: Add test case for issue #8513. 2013-08-16 22:30:43 +02:00
Michael Woerister
c1734cef33 debuginfo: Implemented support for Self type parameter in trait methods with default implementation. 2013-08-16 22:30:43 +02:00
Michael Woerister
a36e53730f debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs.
Also new test cases for tuple structs and by-value parameter passing.
2013-08-16 22:30:43 +02:00
Michael Woerister
689929c51a debuginfo: Added support for self parameter in methods. 2013-08-16 22:30:42 +02:00
Michael Woerister
44557e7a33 debuginfo: Fixed crash occuring for parameterless closures. 2013-08-16 22:30:42 +02:00
Michael Woerister
5c9d7c2072 debuginfo: Added test cases for generic structs and enums.
Also, always set no_monomorphic_collapse flags if debuginfo is generated.
2013-08-16 22:30:42 +02:00
Michael Woerister
6c49c2df76 debuginfo: Properly handle monomorphization of generic functions. 2013-08-16 22:30:42 +02:00
Michael Woerister
907633b1bf debuginfo: Generate template type parameters for generic functions.
Conflicts:
	src/librustc/lib/llvm.rs
	src/librustc/middle/trans/debuginfo.rs
	src/rustllvm/RustWrapper.cpp
	src/rustllvm/rustllvm.def.in
2013-08-16 22:27:38 +02:00
Michael Woerister
1dec27bed5 debuginfo: Fixed option-like-enum test case so it does not rely on undefined behavior. 2013-08-16 22:27:38 +02:00
Kevin Ballard
418e1ebae6 Reserve 'yield' keyword
Rename task::yield() to task::deschedule().

Fixes #8494.
2013-08-16 13:26:50 -07:00
Brian Anderson
a4d171e009 rt: Remove unused uv helpers 2013-08-16 13:24:25 -07:00
Brian Anderson
5052773ad8 rt: Remove empty rust_upcall.h 2013-08-16 13:24:25 -07:00
Brian Anderson
450f16eb25 rt: Remove unused rust_clone_type_desc declaration 2013-08-16 13:24:25 -07:00
Brian Anderson
da7d79dfbe rt: Remove rust_stack 2013-08-16 13:24:25 -07:00
Brian Anderson
8861ba6159 rt: Remove rust_refcount.h 2013-08-16 13:24:25 -07:00
Brian Anderson
cb89afc64e rt: Remove unused parts of rust_log 2013-08-16 13:24:25 -07:00
Brian Anderson
085dc55e13 rt: Remove unused parts of rust_globals.h 2013-08-16 13:24:24 -07:00
Brian Anderson
1b6292aaea rt: Remove rust_signal.h 2013-08-16 13:24:24 -07:00
Brian Anderson
9c71f4f1e0 Remove the annihilate lang item 2013-08-16 13:24:24 -07:00
Brian Anderson
5923cc3745 rt: Remove rust_env 2013-08-16 13:24:24 -07:00
Kevin Ballard
e7b8524b3d Give XorShiftRng::new() a random seed
Fixes #8359.
2013-08-16 12:11:34 -07:00
bors
a1674b6150 auto merge of #8534 : huonw/rust/tls-key-macro, r=alexcrichton
This allows the internal implementation details of the TLS keys to be
changed without requiring the update of all the users. (Or, applying
changes that *have* to be applied for the keys to work correctly, e.g.
forcing LLVM to not merge these constants.)
2013-08-16 08:05:10 -07:00
bors
680eb71564 auto merge of #8532 : kballard/rust/cstr-cleanup, r=erickt
Implement interior null checking in `.to_c_str()`, among other changes.
2013-08-16 06:02:14 -07:00
Gavin Baker
328261aa54 Add UUID support to libextra
- generate random UUIDs
- convert to and from strings and bytes
- parse common string formats
- implements Zero, Clone, FromStr, ToStr, Eq, TotalEq and Rand
- unit tests and documentation
- parsing error codes and strings
- incorporate feedback from PR review
2013-08-16 23:00:35 +10:00
bors
8caf517622 auto merge of #8530 : brson/rust/rt-backtrace, r=alexcrichton
The new scheduler didn't preserve this behavior.
2013-08-16 03:59:14 -07:00
Chris Morgan
1f41140c22 Implement Clone and DeepClone for time types. 2013-08-16 20:17:27 +10:00
Chris Morgan
14885dade4 Implement DeepClone for str types. 2013-08-16 20:17:02 +10:00
bors
72b50e729d auto merge of #8526 : blake2-ppc/rust/either-result, r=catamorphism
Retry of PR #8471

Replace the remaining functions marked for issue #8228 with similar functions that are iterator-based.

Change `either::{lefts, rights}` to be iterator-filtering instead of returning a vector.

Replace `map_vec`, `map_vec2`, `iter_vec2` in std::result with three functions:

* `result::collect` gathers `Iterator<Result<V, U>>` to `Result<~[V], U>`
* `result::fold` folds `Iterator<Result<T, E>>` to `Result<V, E>`
* `result::fold_` folds `Iterator<Result<T, E>>` to `Result<(), E>`
2013-08-16 01:56:16 -07:00
bors
92af0db0a3 auto merge of #8518 : catamorphism/rust/issue-8498-workaround, r=brson
r? @brson
2013-08-15 23:56:14 -07:00
Huon Wilson
72fd02d939 doc: convert remaining uses of core:: to std::. 2013-08-16 15:54:14 +10:00
Huon Wilson
abe94f9b4d doc: correct spelling in documentation. 2013-08-16 15:41:28 +10:00
Huon Wilson
3ad23552fb syntax: add a local_data_key macro that creates a key for access to the TLS.
This allows the internal implementation details of the TLS keys to be
changed without requiring the update of all the users. (Or, applying
changes that have to be applied for the keys to work correctly, e.g.
forcing LLVM to not merge these constants.)
2013-08-16 14:37:24 +10:00
Kevin Ballard
fdaae34478 Better error message for unknown start of token
The span was fixed at some point to point to the correct character, but
the error message is still bad. Update it to emit the actual character
in question (potentially escaped).

Fixes #3747.
2013-08-15 21:16:40 -07:00
bors
253337de82 auto merge of #7917 : catamorphism/rust/resolve-and-testcases, r=catamorphism 2013-08-15 20:56:12 -07:00
Tim Chevalier
0266172eae testsuite: xfailed test cases 2013-08-15 19:22:26 -07:00
bors
1ad0cf5841 auto merge of #8503 : thestinger/rust/iterator, r=alexcrichton 2013-08-15 18:23:14 -07:00
Daniel Micay
3cec67bbf2 rm obsolete test 2013-08-15 21:12:54 -04:00
Daniel Micay
486501963a vec: rm redundant is_empty implementations 2013-08-15 21:12:35 -04:00
Daniel Micay
fe047e07ba iterator: cleanup 2013-08-15 21:12:34 -04:00
Daniel Micay
45426c3b4c vec: rm obsolete zip and zip_slice
These are obsoleted by the generic iterator `zip` adaptor. Unlike
these, it does not clone the elements or allocate a new vector by
default.
2013-08-15 21:12:34 -04:00
Daniel Micay
1f89eb867a tuple: remove obsolete ExtendedTupleOps
replaced by iterators (generic composable `map` and `zip` adaptors)
2013-08-15 21:12:34 -04:00