summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2014-03-31Bump version to 0.10Alex Crichton-5/+5
2014-03-31auto merge of #13221 : thestinger/rust/append, r=alexcrichtonbors-9/+7
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30auto merge of #13206 : TeXitoi/rust/fix-shootout-k-nucleotide, r=alexcrichtonbors-35/+37
Correct printing (sort, new lines), reading on stdin.
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-9/+7
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30make shootout-k-nucleotide.rs pass official testGuillaume Pinot-35/+37
Correct printing (sort, new lines), reading on stdin, s/i32/uint/, ignore-android because it reads stdin
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-2/+4
2014-03-29auto merge of #13183 : erickt/rust/remove-list, r=alexcrichtonbors-43/+20
`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-29auto merge of #13143 : gentlefolk/rust/issue-9227, r=michaelwoeristerbors-70/+601
Only supports crate level statics. No debug info is generated for function level statics. Closes #9227. As discussed at the end of the comments for #9227, I took an initial stab at adding support for function level statics and decided it would be enough work to warrant being split into a separate issue. See #13144 for the new issue describing the need to add support for function level static variables.
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-264/+265
Closes #2569
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-6/+49
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-15/+28
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-114/+114
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-28auto merge of #13107 : seanmonstar/rust/encoder-errors, r=ericktbors-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-27auto merge of #13108 : pongad/rust/lintraw, r=huonwbors-0/+35
Fixes #13032
2014-03-27Initial support for emitting DWARF for static vars.gentlefolk-70/+601
Only supports crate level statics. No debug info is generated for function level statics. Closes #9227.
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-27auto merge of #13050 : alexcrichton/rust/no-send-default, r=huonwbors-28/+28
See #10296 for the rationale, and commits for the implementation.
2014-03-27Fix fallout of removing default boundsAlex Crichton-28/+28
This is all purely fallout of getting the previous commit to compile.
2014-03-27auto merge of #13136 : alexcrichton/rust/spawn-deadlock, r=brsonbors-1/+13
This bench is meant to exercise libgreen, not libnative. It recently caused the auto-linux-32-nopt-t bot to fail as no output was produced for an hour.
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-27Added lint for #[deriving] structs and enums with unsafe pointers. #13032.Michael Darakananda-0/+35
2014-03-26auto merge of #13079 : alexcrichton/rust/colons, r=cmrbors-8/+35
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-26auto merge of #13145 : alexcrichton/rust/flip-some-defaults, r=brsonbors-21/+1
This change prepares `rustc` to accept private fields by default. These changes will have to go through a snapshot before the rest of the changes can happen.
2014-03-26syntax: Tweak parsing bounds on generics pathsAlex Crichton-8/+35
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-26rustc: Relax restriction on privacy for fieldsAlex Crichton-21/+1
This is a necessary change in preparation for switching the defaults as part of #8122. RFC: 0004-private-fields
2014-03-26Add test using early-bound lifetimes in trait generic parameters.Felix S. Klock II-0/+135
2014-03-26bench: Put the spawn bench back on libgreenAlex Crichton-1/+13
This bench is meant to exercise libgreen, not libnative. It recently caused the auto-linux-32-nopt-t bot to fail as no output was produced for an hour.
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-68/+13
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-25auto merge of #13083 : FlaPer87/rust/issue-13005-borrow-unsafe-static, ↵bors-0/+7
r=nikomatsakis It was possible to borrow unsafe static items in static initializers. This patch implements a small `Visitor` that walks static initializer's expressions and checks borrows aliasability. Fixes #13005 cc @nikomatsakis r?
2014-03-24auto merge of #12900 : alexcrichton/rust/rewrite-sync, r=brsonbors-298/+54
* 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-298/+54
2014-03-24rustc: Remove all crate map supportAlex Crichton-63/+4
The crate map is no longer necessary now that logging and event loop factories have been moved out. Closes #11617 Closes #11731
2014-03-24green: Remove the dependence on the crate mapAlex Crichton-5/+9
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-24rustc: Completely forbid borrows of unsafe staticsFlavio Percoco-0/+7
Summary: It was possible to borrow unsafe static items in static initializers. This patch implements a small `Visitor` that walks static initializer's expressions and checks borrows aliasability. Fixes #13005 Test Plan: make check Differential Revision: http://phabricator.octayn.net/D2
2014-03-24auto merge of #12998 : huonw/rust/log_syntax, r=alexcrichtonbors-1/+59
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 #13074 : pczarn/rust/build-rlib, r=alexcrichtonbors-1/+3
Fixes #12992 I tried to increase the number of deflate's probes. Reduction of 0.5% or 2% is not enough.
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-23rustc: Change the filename of compressed bitcodePiotr Czarnecki-1/+3
Fixes #12992 Store compressed bitcode files in rlibs with a different extension. Compression doesn't interfere with --emit=bc. Regression test compares outputs.
2014-03-23auto merge of #13090 : thestinger/rust/iter, r=Aatchbors-3/+3
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-3/+3
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