summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-1/+1
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-1/+3
2014-03-29auto merge of #13183 : erickt/rust/remove-list, r=alexcrichtonbors-42/+15
`collections::list::List` was decided in a [team meeting](https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-03-25) that it was unnecessary, so this PR removes it. Additionally, it removes an old and redundant purity test and fixes some warnings.
2014-03-28auto merge of #13157 : pnkfelix/rust/fsk-iss13140, r=nikomatsakisbors-0/+135
r? @nikomatsakis Fix #13140 Includes two fixes, and a semi-thorough regression test. (There is another set of tests that I linked from #5121, but those are sort of all over the place, while the ones I've included here are more directly focused on the issues at hand.)
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-0/+1
Closes #2569
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-2/+45
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr` matcher is now ambiguous because it doesn't disambiguate whether it means inner attribute or outer attribute. The new behavior can still be achieved by taking an argument of the form `#[$foo:meta]` (the brackets are part of the macro pattern). Closes #13067
2014-03-28auto merge of #13158 : alexcrichton/rust/issue-13123, r=brsonbors-0/+36
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a syscall by default. The native runtime doesn't install a SIGPIPE handler, causing the program to die immediately in this case. This brings the behavior in line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the application in the form of an IoError. Closes #13123
2014-03-28native: Ignore SIGPIPE by defaultAlex Crichton-0/+36
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a syscall by default. The native runtime doesn't install a SIGPIPE handler, causing the program to die immediately in this case. This brings the behavior in line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the application in the form of an IoError. Closes #13123
2014-03-28native: Use WNOHANG before signalingAlex Crichton-19/+26
It turns out that on linux, and possibly other platforms, child processes will continue to accept signals until they have been *reaped*. This means that once the child has exited, it will succeed to receive signals until waitpid() has been invoked on it. This is unfortunate behavior, and differs from what is seen on OSX and windows. This commit changes the behavior of Process::signal() to be the same across platforms, and updates the documentation of Process::kill() to note that when signaling a foreign process it may accept signals until reaped. Implementation-wise, this invokes waitpid() with WNOHANG before each signal to the child to ensure that if the child has exited that we will reap it. Other possibilities include installing a SIGCHLD signal handler, but at this time I believe that that's too complicated. Closes #13124
2014-03-28test: remove pure test, which is now redundant with inline testsErick Tryzelaar-36/+0
2014-03-28collections: remove ListErick Tryzelaar-14/+23
It was decided in a meeting that this module wasn't needed, and more thought should be put into a persistent collections library.
2014-03-28Rename Pod into CopyFlavio Percoco-17/+17
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-27serialize: use ResultSean McArthur-3/+3
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27Fix fallout of removing default boundsAlex Crichton-18/+17
This is all purely fallout of getting the previous commit to compile.
2014-03-27auto merge of #13001 : cmr/rust/unnamed-lifetime-nocapture, r=nikomatsakisbors-0/+1
Closes #6751
2014-03-27test/run-pass/out-of-stack: prevent tcoCorey Richardson-0/+1
We really do *not* want TCO to kick in. If it does, we'll never blow the stack, and never trigger the condition the test is checking for. To that end, do a meaningless alloc that serves only to get a destructor to run. The addition of nocapture/noalias seems to have let LLVM do more TCO, which hurt this testcase.
2014-03-27auto merge of #13034 : edwardw/rust/match, r=nikomatsakisbors-0/+199
The `_match.rs` takes advantage of passes prior to `trans` and aggressively prunes the sub-match tree based on exact equality. When it comes to literal or range, the strategy may lead to wrong result if there's guard function or multiple patterns inside tuple. Closes #12582. Closes #13027.
2014-03-27_match.rs: prune sub-match tree too aggressivelyEdward Wang-0/+199
The `_match.rs` takes advantage of passes prior to `trans` and aggressively prunes the sub-match tree based on exact equality. When it comes to literal or range, the strategy may lead to wrong result if there's guard function or multiple patterns inside tuple. Closes #12582. Closes #13027.
2014-03-26auto merge of #13079 : alexcrichton/rust/colons, r=cmrbors-6/+33
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather than `Foo: (Bound) <trait-parameters>` This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be clear where the trait parameters are going. Closes #9265
2014-03-26syntax: Tweak parsing bounds on generics pathsAlex Crichton-6/+33
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather than `Foo: (Bound) <trait-parameters>` This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be clear where the trait parameters are going. Closes #9265
2014-03-26Add test using early-bound lifetimes in trait generic parameters.Felix S. Klock II-0/+135
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-4/+8
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-24auto merge of #12900 : alexcrichton/rust/rewrite-sync, r=brsonbors-5/+5
* Remove clone-ability from all primitives. All shared state will now come from the usage of the primitives being shared, not the primitives being inherently shareable. This allows for fewer allocations for stack-allocated primitives. * Add `Mutex<T>` and `RWLock<T>` which are stack-allocated primitives for purely wrapping a piece of data * Remove `RWArc<T>` in favor of `Arc<RWLock<T>>` * Remove `MutexArc<T>` in favor of `Arc<Mutex<T>>` * Shuffle around where things are located * The `arc` module now only contains `Arc` * A new `lock` module contains `Mutex`, `RWLock`, and `Barrier` * A new `raw` module contains the primitive implementations of `Semaphore`, `Mutex`, and `RWLock` * The Deref/DerefMut trait was implemented where appropriate * `CowArc` was removed, the functionality is now part of `Arc` and is tagged with `#[experimental]`. * The crate now has #[deny(missing_doc)] * `Arc` now supports weak pointers This is not a large-scale rewrite of the functionality contained within the `sync` crate, but rather a shuffling of who does what an a thinner hierarchy of ownership to allow for better composability.
2014-03-24test: Update all tests with the sync changesAlex Crichton-5/+5
2014-03-24green: Remove the dependence on the crate mapAlex Crichton-4/+8
This is the final nail in the coffin for the crate map. The `start` function for libgreen now has a new added parameter which is the event loop factory instead of inferring it from the crate map. The two current valid values for this parameter are `green::basic::event_loop` and `rustuv::event_loop`.
2014-03-24auto merge of #12998 : huonw/rust/log_syntax, r=alexcrichtonbors-0/+30
syntax: allow `trace_macros!` and `log_syntax!` in item position. Previously trace_macros!(true) fn main() {} would complain about `trace_macros` being an expression macro in item position. This is a pointless limitation, because the macro is purely compile-time, with no runtime effect. (And similarly for log_syntax.) This also changes the behaviour of `trace_macros!` very slightly, it used to be equivalent to macro_rules! trace_macros { (true $($_x: tt)*) => { true }; (false $($_x: tt)*) => { false } } I.e. you could invoke it with arbitrary trailing arguments, which were ignored. It is changed to accept only exactly `true` or `false` (with no trailing arguments) and expands to `()`.
2014-03-23auto merge of #13102 : huonw/rust/totaleq-deriving, r=thestingerbors-20/+1
std: remove the `equals` method from `TotalEq`. `TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
2014-03-23std: remove the `equals` method from `TotalEq`.Huon Wilson-20/+1
`TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
2014-03-23auto merge of #13090 : thestinger/rust/iter, r=Aatchbors-2/+2
This has been rendered obsolete by partial type hints. Since the `~[T]` type is in the process of being removed, it needs to go away.
2014-03-23iter: remove `to_owned_vec`Daniel Micay-2/+2
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-22auto merge of #13088 : thestinger/rust/hashmap, r=cmrbors-2/+4
Closes #5283
2014-03-23use TotalEq for HashMapDaniel Micay-2/+4
Closes #5283
2014-03-22auto merge of #13089 : thestinger/rust/managed, r=Aatchbors-68/+0
This removes two tests built on `managed::refcount`, but these issues are well-covered elsewhere for non-managed types.
2014-03-22make std::managed privateDaniel Micay-68/+0
This removes two tests built on `managed::refcount`, but these issues are well-covered elsewhere for non-managed types.
2014-03-23Implement cross-crate support for autoderef.Eduard Burtescu-0/+18
Closes #13044.
2014-03-22Implement vtable support for autoderef.Eduard Burtescu-0/+42
Closes #13042.
2014-03-22auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichtonbors-13/+13
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-1/+1
Favor using '*' instead
2014-03-22test: Fix fallout of removing get()Alex Crichton-6/+6
2014-03-22test: Remove Freeze / NoFreeze from testsFlavio Percoco-13/+13
2014-03-21auto merge of #13036 : alexcrichton/rust/atomics, r=alexcrichtonbors-32/+32
Closes #11583, rebasing of #12430 now that we've got `Share` and better analysis with statics.
2014-03-21rustc: Switch defaults from libgreen to libnativeAlex Crichton-62/+74
The compiler will no longer inject libgreen as the default runtime for rust programs, this commit switches it over to libnative by default. Now that libnative has baked for some time, it is ready enough to start getting more serious usage as the default runtime for rustc generated binaries. We've found that there isn't really a correct decision in choosing a 1:1 or M:N runtime as a default for all applications, but it seems that a larger number of programs today would work more reasonable with a native default rather than a green default. With this commit come a number of bugfixes: * The main native task is now named "<main>" * The main native task has the stack bounds set up properly * #[no_uv] was renamed to #[no_start] * The core-run-destroy test was rewritten for both libnative and libgreen and one of the tests was modified to be more robust. * The process-detach test was locked to libgreen because it uses signal handling
2014-03-22syntax: allow `trace_macros!` and `log_syntax!` in item position.Huon Wilson-0/+30
Previously trace_macros!(true) fn main() {} would complain about `trace_macros` being an expression macro in item position. This is a pointless limitation, because the macro is purely compile-time, with no runtime effect. (And similarly for log_syntax.) This also changes the behaviour of `trace_macros!` very slightly, it used to be equivalent to macro_rules! trace_macros { (true $($_x: tt)*) => { true }; (false $($_x: tt)*) => { false } } I.e. you could invoke it with arbitrary trailing arguments, which were ignored. It is changed to accept only exactly `true` or `false` (with no trailing arguments) and expands to `()`.
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-150/+4
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-278/+321
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-21test: Automatically remove all `~[T]` from tests.Patrick Walton-345/+349
2014-03-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-3/+6
2014-03-20Added new attribute syntax with backward compatibility.Daniel Fagnan-0/+33
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-03-20std: Make the generic atomics take unsafe pointersBrian Anderson-32/+32
These mutate values behind references that are Freeze, which is not allowed.