about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-05-11Warning policeTim Chevalier-136/+51
2013-05-11auto merge of #6426 : gifnksm/rust/new-iter, r=catamorphismbors-7/+20
2013-05-11auto merge of #6420 : huonw/rust/rm-exec, r=thestingerbors-0/+0
2013-05-12libstd: Fix BigUint::is_evengifnksm-1/+12
2013-05-11rustc: Don't call type_error_message() with ty_err as the expected typeTim Chevalier-49/+84
In #6319, several people mentioned they ran into a "computing fictitious type" ICE in trans. This turns out to be because some of my recent changes to typeck::check::_match resulted in type errors getting reported with ty_err as the expected type, which meant the errors were suppressed, and typechecking incorrectly succeeded (since the errors weren't recorded). Changed the error messages in these cases not to use an expected type at all, rather, printing out a string describing the type that was expected (which is what the code originally did). The result is a bit repetitive and the proliferation of error-reporting functions in typeck::infer is a bit annoying, but I thought it was important to fix this now; more cleanup can happen later.
2013-05-11auto merge of #6402 : kud1ing/rust/fixes, r=pcwaltonbors-34/+34
2013-05-12libcore: Change `each_val` to follow new for-loop protocolgifnksm-7/+20
2013-05-11auto merge of #6397 : cantsin/rust/rusti-fixes, r=catamorphismbors-2/+2
Fixes #6378 Don't pass the binary name to the LLVMRustExecuteJIT closure, otherwise it will leak memory; the binary name doesn't seem to be needed, anyhow.
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-105/+105
Fix for #3356
2013-05-11auto merge of #6385 : huonw/rust/rustc-dtor-struct-match, r=nikomatsakisbors-23/+132
**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-16/+7
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-11Fix errors in test_hashset().Samuel Chase-3/+4
All tests now pass.
2013-05-11Use acc.push_str() instead of str::push_str(..)Samuel Chase-12/+24
Also added some whitespace to enhance readabilty.
2013-05-11Add test: test_hashset()Samuel Chase-0/+14
2013-05-11Add str representation for HashSet.Samuel Chase-0/+18
2013-05-11Remove extra space between key and value.Samuel Chase-6/+9
1. Extra space removed. 2. Using acc.push_str() instead of str::push_str 3. Update test to reflect representation change.
2013-05-11All tests, including newly added test_hashmap() pass. The empty Hash Table ↵Samuel Chase-9/+11
doesn't need to be mutable.
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/+83
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/+62
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/+41
2013-05-11Remove core executableHuon Wilson-0/+0
2013-05-10auto merge of #6260 : alexcrichton/rust/issue-3466-no-swap, r=pcwaltonbors-399/+292
There may be a more efficient implementation of `core::util::swap_ptr`. The issue mentioned using `move_val_init`, but I couldn't figure out what that did, so I just used `copy_memory` a few times instead. I'm not exactly the best at reading LLVM generated by rust, but this does appear to be optimized away just as expected (when possible).
2013-05-10Fix tests with the swap operatorAlex Crichton-2/+2
2013-05-10Remove the '<->' operator from the languageAlex Crichton-98/+15
2013-05-10Stop using the '<->' operatorAlex Crichton-296/+214
2013-05-10Implement util::swap without the '<->' operatorAlex Crichton-5/+63
2013-05-10auto merge of #6205 : brson/rust/flate, r=brsonbors-7/+7
r? @graydon I don't think this is necessary in core.
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-304/+2943
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10Fix merge "failures"Alex Crichton-12/+20
2013-05-10test: Use the new `for` protocolAlex Crichton-45/+164
2013-05-10Move flate from core to stdBrian Anderson-7/+7
2013-05-11Removed test_hashmap() for the time, being. All tests pass with make check.Samuel Chase-10/+11
2013-05-10more back-ticks, less colonsLenny222-34/+34
2013-05-11Add to_str() for HashMaps, and some basic tests as well.Samuel Chase-0/+36
2013-05-10Remove redundant import errorCorey Richardson-1/+0
2013-05-10auto merge of #6380 : pcwalton/rust/core-text-ice, r=pcwaltonbors-19/+21
2013-05-10Fixes rusti crashes.James Tranovich-2/+2
Don't pass the binary name to the LLVMRustExecuteJIT closure; doesn't seem to be needed, anyhow.
2013-05-10auto merge of #6366 : catamorphism/rust/issue-3920, r=catamorphismbors-2/+24
r? @nikomatsakis as per #3920
2013-05-10renamed str::from_slice to str::to_ownedYoungsoo Son-66/+66
2013-05-10auto merge of #6358 : crabtw/rust/mips-segstk, r=brsonbors-8/+218
I changed ```RED_ZONE_SIZE``` to ```RZ_MAC_32``` because of stack canary failure. Here is a LLVM patch for MIPS segmented stacks. http://people.cs.nctu.edu.tw/~jyyou/rust/mips-segstk.patch Current test results ``` failures: rand::tests::test_rng_seeded_custom_seed2 run::tests::test_forced_destroy_actually_kills run::tests::test_unforced_destroy_actually_kills time::tests::run_tests uv_ll::test::test_uv_ll_struct_size_addrinfo uv_ll::test::test_uv_ll_struct_size_uv_timer_t segfaults: rt::io::option::test::test_option_writer_error rt::local_services::test::unwind rt::sched::test_swap_tasks_then stackwalk::test_simple stackwalk::test_simple_deep ```
2013-05-10auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoanbors-23/+24
Fix for #6306
2013-05-10Add some positive tests for dtor struct destructuringHuon Wilson-0/+46
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-39/+39
2013-05-10Issue number on xfailed testHuon Wilson-1/+1
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-466/+521
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-10librustc: allow destructuring of structs with destructors if the pattern has ↵Huon Wilson-23/+86
no moves. This check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s.
2013-05-10A test file is fixedYoungsoo Son-2/+2
2013-05-10auto merge of #6347 : cmr/rust/unknown_module_resolve_error, r=catamorphismbors-2/+24
This improves error reporting for the following class of imports: ```rust use foo::bar; ``` Where foo, the topmost module, is unresolved. It now results in: ```text /tmp/foo.rs:1:4: 1:7 error: unresolved import. perhapsyou forgot an 'extern mod foo'? /tmp/foo.rs:1 use foo::bar; ^~~ /tmp/foo.rs:1:4: 1:12 error: failed to resolve import: foo::bar /tmp/foo.rs:1 use foo::bar; ^~~~~~~~ error: failed to resolve imports error: aborting due to 3 previous errors ``` This is the first of a series of changes I plan on making to unresolved name error messages.