about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-1/+1
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-40/+40
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-13auto merge of #6388 : recrack/rust/each2_mut, r=pcwaltonbors-0/+38
- vec.rs :add 'each2_mut function' - testsuit : run-pass/vec-each2_mut.rs
2013-05-13core: Move locks, atomic rc to unstable::syncBrian Anderson-1/+1
2013-05-13Add vec.rs each2_mut testsuiteYoungmin Yoo-0/+38
2013-05-12Adds atomic_load, atomic_load_acq, atomic_store, and atomic_store_rel ↵Matthijs Hofstra-0/+15
intrinsics. The default versions (atomic_load and atomic_store) are sequentially consistent. The atomic_load_acq intrinsic acquires as described in [1]. The atomic_store_rel intrinsic releases as described in [1]. [1]: http://llvm.org/docs/Atomics.html
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-2/+2
Fix for #3356
2013-05-11auto merge of #6385 : huonw/rust/rustc-dtor-struct-match, r=nikomatsakisbors-0/+64
**Caveat**: With the current commit, this check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s, and invalid/unsafe code compiles. I don't know how to fix this, I experimented with some things to try to make let patterns and match patterns run on the same code (since this would presumably fix many of the other unsoundness issues of let-patterns, e.g. #6225), but I don't understand enough of the code. (I think I heard someone talking about a fix for `let` being in progress?) Fixes #6344 and #6341.
2013-05-11auto merge of #6383 : huonw/rust/rustc-expand-then-strip, r=thestingerbors-12/+3
This allows macros to create tests and benchmarks. This is possibly unsound (I've got no idea, but it seemed to work), and being able to programmatically generate benchmarks to compare several implementations of similar algorithms is nice.
2013-05-11Correct testcases that passed because fns with #[test] were stripped before ↵Huon Wilson-12/+3
expansion.
2013-05-11auto merge of #6384 : thomaslee/rust/issue-4202, r=catamorphismbors-0/+19
This fixes the issue described in #4202. From what I understood of the code, when we reexport a trait in a submodule using e.g. "pub use foo::SomeTrait", we were not previously making an effort to reexport the static methods on that trait. I'm new to the Rust code base (and the Rust language itself) so my approach may not be kosher, but this patch works by changing the encoder to include the static methods associated with traits. I couldn't see any tests for this area of the code, so I didn't really have any examples to go by. If tests are needed, I'm happy to work through that if I can get some assistance to do so.
2013-05-10auto merge of #6376 : nikomatsakis/rust/issue-6272-tests, r=graydonbors-0/+41
r? @graydon
2013-05-10auto merge of #6368 : catamorphism/rust/issue-5315, r=catamorphismbors-0/+43
2013-05-10Test case for issue #4202Tom Lee-0/+19
2013-05-10Stop using the '<->' operatorAlex Crichton-22/+35
2013-05-10test: Use the new `for` protocolAlex Crichton-25/+24
2013-05-10renamed str::from_slice to str::to_ownedYoungsoo Son-2/+2
2013-05-10Add some positive tests for dtor struct destructuringHuon Wilson-0/+46
2013-05-10librustc: allow destructuring of structs with destructors if the pattern has ↵Huon Wilson-0/+18
no moves. This check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s.
2013-05-09auto merge of #6336 : nikomatsakis/rust/issue-6308-closure-bounds, ↵bors-0/+26
r=nikomatsakis Use a bitset to represent built-in bounds. There are several places in the language where only builtin bounds (aka kinds) will be accepted, e.g. on closures, destructor type parameters perhaps, and on trait types. r? @brson
2013-05-09test: Add two tests for issue #6272.Niko Matsakis-0/+41
2013-05-09auto merge of #6354 : Aatch/rust/uninit-intrinsic, r=graydonbors-0/+19
Adds an `uninit` intrinsic. It's just an empty function, so llvm optimizes it down to nothing. I changed all of the `init` intrinsic usages to `uninit` where it seemed appropriate to.
2013-05-09testsuite: Add two test cases (one xfailed)Tim Chevalier-0/+43
2013-05-09Refactor representation of bounds to separate out BuiltinBounds intoNiko Matsakis-0/+26
its own type. Use a bitset to represent built-in bounds. There are several places in the language where only builtin bounds (aka kinds) will be accepted, e.g. on closures, destructor type parameters perhaps, and on trait types.
2013-05-09auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiynbors-3/+3
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean
2013-05-09Add uninit intrinsicJames Miller-0/+19
2013-05-08test: Fix tests.Patrick Walton-79/+83
2013-05-08test: Fix tests and the pipe compilerPatrick Walton-24/+42
2013-05-08auto merge of #6214 : sanxiyn/rust/simd-2, r=graydonbors-0/+9
At the moment this only includes type checking and there is no code generation support yet. I wanted to get the design reviewed first. From discussion with @graydon at #5841, re-implemented as `#[simd]` attribute on structs. Progressing towards #3499.
2013-05-08auto merge of #6119 : brson/rust/main, r=brsonbors-0/+6
r? @ILyoan This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (`#[main]` can still be used anywhere). I don't understand the special android logic here and worry that I may have broken it.
2013-05-09Fix typosSean Moon-3/+3
2013-05-08auto merge of #6267 : huonw/rust/syntax-deriving-generaliseder, r=nikomatsakisbors-0/+149
This "finishes" the generic deriving code (which I started in #5640), in the sense it supports everything that I can think of being useful. (Including lifetimes and type parameters on methods and traits, arguments and return values of (almost) any type, static methods.) It closes #6149, but met with #6257, so the following doesn't work: ```rust #[deriving(TotalEq)] struct Foo<'self>(&'self int); ``` (It only fails for `TotalOrd`, `TotalEq` and `Clone`, since they are the only ones that call a method directly on sub-elements of the type, which means that the auto-deref interferes with the pointer.) It also makes `Rand` (chooses a random variant, fills the fields with random values, including recursively for recursive types) and `ToStr` (`x.to_str()` is the same as `fmt!("%?", x)`) derivable, as well as converting IterBytes to the generic code (which made the code 2.5x shorter, more robust and added support for tuple structs). ({En,De}codable are trickier, so I'll convert them over later.)
2013-05-08testsuite: xfail tests for windowsHuon Wilson-0/+2
2013-05-08auto merge of #6321 : ILyoan/rust/test4350, r=z0w0bors-5/+5
2013-05-08testsuite: update a test for #4350ILyoan-5/+5
2013-05-07auto merge of #6303 : nikomatsakis/rust/issue-4666-test, r=nikomatsakisbors-0/+50
existing tests. The bug itself was fixed as part of recent borrowck reform. Fixes #4666.
2013-05-07auto merge of #6302 : nikomatsakis/rust/issue-6141-leaking-owned-fn, r=brsonbors-0/+8
When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`. Fixes #6141. r? @brson
2013-05-07auto merge of #6282 : alexcrichton/rust/issue-5517-add-test, r=thestingerbors-0/+14
It appears the cause of #5517 was fixed in 0dc6c414, so adding a test so the issue can be closed.
2013-05-07Add test for #4666, which didn't *quite* seem to be covered byNiko Matsakis-0/+50
existing tests. The bug itself was fixed as part of recent borrowck reform. Fixes #4666.
2013-05-07When autoborrowing a fn in trans, adjust the type of the datum to be `&fn`.Niko Matsakis-0/+8
Fixes #6141.
2013-05-07Add SIMD vector type testsSeo Sanghyeon-0/+9
2013-05-07auto merge of #6245 : youknowone/rust/match-range-static, r=graydonbors-0/+10
Fix unintended error problem of: ```` static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } } ````
2013-05-06auto merge of #6236 : alexcrichton/rust/more-map-methods, r=thestingerbors-0/+4
Closes #5392 and #5393 I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation. One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
2013-05-07Add pop() and swap() to the Map traitAlex Crichton-0/+4
2013-05-06auto merge of #6228 : brson/rust/run-destroy, r=brsonbors-0/+89
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
2013-05-06Add a test for issue 5517Alex Crichton-0/+14
2013-05-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-34/+52
2013-05-06Move core::run tests of process killing into standalone run-pass testsBrian Anderson-0/+89
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
2013-05-06auto merge of #6265 : sanxiyn/rust/xc-packed, r=nikomatsakisbors-0/+8
2013-05-07testsuite: tests for deriving changes and additionsHuon Wilson-0/+147