Commit Graph

17856 Commits

Author SHA1 Message Date
bors c49cf8b330 auto merge of #6205 : brson/rust/flate, r=brson
r? @graydon

I don't think this is necessary in core.
2013-05-10 19:41:00 -07:00
bors 3e0400fb86 auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwalton
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-10 17:56:02 -07:00
Alex Crichton 606bd75586 Fix merge "failures" 2013-05-10 19:20:21 -04:00
Alex Crichton b05aae2d41 test: Use the new for protocol 2013-05-10 19:20:20 -04:00
Brian Anderson 7652f3ddb8 Move flate from core to std 2013-05-10 16:00:26 -07:00
bors d546493096 auto merge of #6380 : pcwalton/rust/core-text-ice, r=pcwalton 2013-05-10 13:10:54 -07:00
bors dba9337a48 auto merge of #6366 : catamorphism/rust/issue-3920, r=catamorphism
r? @nikomatsakis as per #3920
2013-05-10 05:52:48 -07:00
bors fdf601eaf3 auto merge of #6358 : crabtw/rust/mips-segstk, r=brson
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-10 04:07:50 -07:00
bors 6da2c989ba auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoan
Fix for #6306
2013-05-10 03:04:51 -07:00
bors e9d0018abf auto merge of #6356 : dotdash/rust/strinterner, r=pcwalton
&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-10 01:55:54 -07:00
Youngsoo Son 4400bbd72a A test file is fixed 2013-05-10 16:55:59 +09:00
bors f04eb37c7e auto merge of #6347 : cmr/rust/unknown_module_resolve_error, r=catamorphism
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.
2013-05-10 00:52:52 -07:00
bors 3e106cf2c2 auto merge of #6339 : alexcrichton/rust/unsafe-cvec, r=catamorphism
As noted by @jwise [here](https://github.com/mozilla/rust/commit/52445129fdb4ee847332acbf516ced8f73b7990a#commitcomment-3172192), it's probably a good idea to keep these unsafe.

The lint check won't warn about these because it ignore `unsafe fn` declarations.
2013-05-09 23:58:53 -07:00
Alex Crichton cdc266e47d Fix deriving(IterBytes) to use the new for-loop protocol 2013-05-10 02:46:19 -04:00
Alex Crichton b01a40d459 rustpkg: Use the new for protocol 2013-05-10 02:46:19 -04:00
Alex Crichton a87db3e2cd rustc: Use the new for protocol 2013-05-10 02:46:19 -04:00
Alex Crichton 5eb6d19803 syntax: Use the new for protocol 2013-05-10 02:46:18 -04:00
Alex Crichton 3ce9dba677 std: Use the new for protocol 2013-05-10 02:46:18 -04:00
Alex Crichton 28256052a4 core: Use the new for protocol 2013-05-10 02:46:18 -04:00
Alex Crichton 0cde8ba684 Implement a new protocol for for loops that's much more easily composable 2013-05-10 02:46:18 -04:00
Youngsoo Son c8e93edf55 Move core::task::local_data to core::local_data 2013-05-10 11:42:45 +09:00
Patrick Walton 923450d00c librustc: Fix ICE in core-text resulting from dynamic borrowing. rs=blocking-servo 2013-05-09 19:39:07 -07:00
bors ad8e236f32 auto merge of #6336 : nikomatsakis/rust/issue-6308-closure-bounds, 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-09 17:50:21 -07:00
Corey Richardson 9cbab89076 fix formating and tests 2013-05-09 20:15:59 -04:00
Corey Richardson 0afcd34215 compile-fail test for new unresolved import error 2013-05-09 20:15:27 -04:00
Tim Chevalier ca18ed8f64 testsuite: Test that init and forget are both unsafe 2013-05-09 15:28:29 -07:00
Tim Chevalier cd235d4230 core: Make intrinsics::forget unsafe, too 2013-05-09 15:28:28 -07:00
Tim Chevalier 646f16d7e4 core: Make intrinsics::init unsafe
as per #3920
2013-05-09 15:27:38 -07:00
bors f547a671dc auto merge of #6373 : nikomatsakis/rust/issue-6355-perf-regression, r=graydon
Fix #6355 and #6272---we were not giving the correct index to the derefs that occur as part of the rooting process, resulting in extra copies and generally bogus behavior. Haven't quite produced the right test for this, but I thought I'd push the fix in the meantime. Test will follow shortly.

r? @graydon
2013-05-09 13:45:49 -07:00
Niko Matsakis 78520867b9 rustc: Add EnumSet tests 2013-05-09 16:28:25 -04:00
Corey Richardson fa5baf399d Tweak error message
Recommendation of @kud1ing
2013-05-09 16:09:01 -04:00
Corey Richardson d3ca9c61a0 Better error message for certain classes of unresolved imports 2013-05-09 16:08:53 -04:00
Niko Matsakis e18ed77b72 Remove remnants of mutable fields from mem_categorization, borrowck. 2013-05-09 15:58:41 -04:00
Niko Matsakis 15164cc6a6 Issue the correct deref count for the implicit deref that occurs
as part of an autoslice operation (#6272).

Fixes #6272.
2013-05-09 15:58:02 -04:00
bors 7675856253 auto merge of #6354 : Aatch/rust/uninit-intrinsic, r=graydon
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-09 12:37:00 -07:00
bors ce9c0225c4 auto merge of #6349 : thestinger/rust/explicit_copy, r=thestinger
I removed some of the copies, but most are just made explicit. The usage in `libcore` was already fixed, but the attribute was only set to warn (not removed).
2013-05-09 11:18:43 -07:00
Daniel Micay 2bc12635a2 remove vecs_implicitly_copyable from libstd/libcore 2013-05-09 14:00:53 -04:00
bors 7a4c6e587d auto merge of #6325 : sammykim/rust/lint-name, r=graydon
Fix #3525.
2013-05-09 08:54:38 -07:00
Niko Matsakis dc2ca9d883 Refactor representation of bounds to separate out BuiltinBounds into
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-09 11:39:06 -04:00
bors 4757a58798 auto merge of #6359 : kud1ing/rust/fixes, r=bstrie 2013-05-09 07:51:40 -07:00
Lenny222 e3230330b7 back-ticks 2013-05-09 15:46:32 +02:00
Björn Steinbrink 1393c3a3f4 Use a specialized string interner to reduce the need for owned strings
&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-09 14:40:19 +02:00
Alex Crichton d6efbad33f Mark c_vec functions as unsafe again 2013-05-09 07:40:19 -04:00
James Miller 414970c46f Add intrinsic declaration where I missed them 2013-05-09 23:16:07 +12:00
James Miller 57509709b4 Make staged versions of the functions that use uninit 2013-05-09 23:05:17 +12:00
bors ca95e7f94e auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiyn
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-09 03:51:32 -07:00
James Miller f5ab112e6b Replace init() with uninit() where appropriate 2013-05-09 22:41:54 +12:00
James Miller 050c744c23 Add uninit intrinsic 2013-05-09 22:23:38 +12:00
bors 5617916726 auto merge of #6343 : thestinger/rust/new_iter, r=brson
it's silly to duplicate the namespace in the fn name
2013-05-09 02:45:31 -07:00
Jyun-Yan You c2bf9bf9fe improve MIPS backend and implement segmented stacks 2013-05-09 16:51:42 +08:00