Commit Graph

17310 Commits

Author SHA1 Message Date
Marvin Löbel
b813d68abe Attempt to fix x86 only strconv test failure 2013-04-23 11:10:37 +02:00
bors
212256b1a0 auto merge of #6025 : alexcrichton/rust/issue-2697, r=catamorphism
Closes #2697

I guess all of the uses weren't around any more, because everything continued to compile (at least on OSX). If bors doesn't like it for another platform I can try to track it down as well.
2013-04-23 01:36:48 -07:00
bors
54b0cbf86e auto merge of #6020 : yichoi/rust/pull-0423, r=brson
fix for missing ARM support to pass make stage of rpass
2013-04-23 00:06:49 -07:00
bors
da601be9f2 auto merge of #6017 : brson/rust/revert-span-merge, r=catamorphism
This reverts commit 6030e3982a.

This reorders error messages in ways that aren't intended. A more satisfying solution will require an interface that allows diagnostics to be grouped together, so that messages that logically belong together aren't reordered.

#4569
2013-04-22 23:09:51 -07:00
Alex Crichton
8884c6abdb Use backticks for the unsafe keyword in error messages 2013-04-23 02:06:47 -04:00
Bill Wendling
ca73fbf726 Use correct grammar for error message.
When the number of parameters is 1, then 'parameter' should remain singular.
Otherwise pluralize it.
2013-04-22 22:08:09 -07:00
bors
2871f4df6f auto merge of #6015 : catamorphism/rust/rustpkg-doc-second-try, r=catamorphism
r? @graydon

Only change from the version that you read is that I addressed your comment about `RUST_PATH`.
2013-04-22 22:03:49 -07:00
Alex Crichton
391de1c690 Remove a stray new operator in rust_task.h 2013-04-23 00:55:13 -04:00
bors
3867470feb auto merge of #6013 : gifnksm/rust/bigint-quot-rem, r=graydon
BigInt had been supported quot/rem and div/mod correctly, but after merging #5990 they have been broken.
This commit fixes it.
2013-04-22 21:09:49 -07:00
bors
309f0c5603 auto merge of #6019 : brson/rust/xfail, r=brson 2013-04-22 19:36:50 -07:00
Young-il Choi
8eb22ecd6d test: fix for missing ARM support 2013-04-23 11:31:54 +09:00
Brian Anderson
08bbf4b019 core: ignore test from_str_ignore_underscores. Broken on i686. #6018 2013-04-22 19:25:25 -07:00
bors
b8441ca8a6 auto merge of #6007 : pcwalton/rust/use-mod, r=brson
r? @brson
2013-04-22 18:36:50 -07:00
Tim Chevalier
4508da226a rustpkg: In doc, mention other implicit RUST_PATH entries
as per Graydon's comment
2013-04-22 18:17:32 -07:00
Tim Chevalier
d834c0d59d docs: Sketch out rustpkg manual 2013-04-22 18:17:32 -07:00
Brian Anderson
81110c55e8 Revert "Errors with the same span print the span once"
This reverts commit 6030e3982a.
2013-04-22 17:47:49 -07:00
bors
773f7e7560 auto merge of #5996 : sanxiyn/rust/target-feature, r=graydon
Fix #1879.
2013-04-22 17:36:49 -07:00
bors
05f9586d06 auto merge of #5980 : Kimundi/rust/ascii-encoding, r=thestinger
Added Ascii type to use for byte inputs that are known to contain Ascii only.
2013-04-22 16:33:51 -07:00
bors
aba93c6b60 auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydon
Closes #3083.

This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about.

Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler).

Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963) before landing this. I figured I'd stick it out for review anyway though.
2013-04-22 15:36:51 -07:00
gifnksm
a117cf03bc libstd: correct bigint's quot/rem, div/modulo 2013-04-23 07:04:05 +09:00
bors
a6dd7dc1f2 auto merge of #5971 : pcwalton/rust/is-absolute, r=pcwalton
r? @jdm last commit
2013-04-22 14:42:50 -07:00
Marvin Löbel
bf4f088eac Added missing assert, did some formating 2013-04-22 22:05:39 +02:00
Marvin Löbel
582a05fc95 Moved ascii out of str
Removed deriving Ord, which allowed to remove the stage markers
2013-04-22 21:42:25 +02:00
Patrick Walton
25129ee81c librustc: Remove use mod from the language 2013-04-22 12:32:59 -07:00
bors
8205f73ce6 auto merge of #6001 : jld/rust/enum-nullable, r=pcwalton
Specifically: all enums with two variants, where one has zero size (and thus at most one inhabitant) and the other has a field where the null value would not be allowed (such as a safe pointer), are now represented by storing a null pointer in the field in question.

This is a generalization of representing `Option<~T>`, `Option<@T>`, and `Option<&T>` with nullable pointers, thus fixing Tony Hoare's “billion dollar mistake”.
2013-04-22 11:09:50 -07:00
Patrick Walton
2c5afa4753 libcore: Add is_absolute() to paths. Closes #5851. 2013-04-22 10:31:30 -07:00
bors
aee2567eca auto merge of #6003 : thestinger/rust/cell, r=nikomatsakis
```rust
use core::cell;

fn main() {
    let x = cell::Cell(Some(~"foo"));
    let y = x.value.get_ref().get_ref();
    do x.with_mut_ref |z| { *z = None; }
    println(*y) // boom!
}
```
2013-04-22 10:15:50 -07:00
Daniel Micay
c99409b332 cell: public field is unsafe
use core::cell;

fn main() {
    let x = cell::Cell(Some(~"foo"));
    let y = x.value.get_ref().get_ref();
    do x.with_mut_ref |z| { *z = None; }
    println(*y) // boom!
}
2013-04-22 13:01:32 -04:00
bors
d0451eebc4 auto merge of #5995 : huonw/rust/core-rand-impls, r=pcwalton 2013-04-22 09:00:53 -07:00
Jed Davis
edc1324e7e Add some tests for nullable-pointer enums 2013-04-22 08:51:34 -07:00
Jed Davis
22f751f0f3 Use nullable pointers to represent enums like Option<~T>.
See comments in adt.rs for details.
2013-04-22 08:50:27 -07:00
Jed Davis
70452e5231 Consider nullability for equivalence of monomorphized fns. 2013-04-22 08:49:56 -07:00
bors
0de3e7a23c auto merge of #5994 : huonw/rust/rational-fail-message, r=thestinger
A pedantic correction; the quotient is the result of `a/b`, not `b`.
2013-04-22 06:57:54 -07:00
Seo Sanghyeon
da4bc490e6 Choose target features 2013-04-22 20:54:12 +09:00
Seo Sanghyeon
ba1f3c9b1f Convert to C string inside WriteOutputFile 2013-04-22 20:17:25 +09:00
Huon Wilson
56679024c5 libcore: Rand impls for tuples and ~/@ boxes 2013-04-22 19:01:48 +10:00
Huon Wilson
e6c4471ed8 libstd: denominator isn't quotient 2013-04-22 16:02:24 +10:00
Jed Davis
7f45ae54ea Fix LLVM bug affecting i1 switches emitted for nullable enum match. 2013-04-21 20:15:57 -07:00
bors
3830040a89 auto merge of #5887 : jdm/rust/stackbounds, r=brson
This is needed to allow GC to work in SpiderMonkey.
2013-04-21 17:33:52 -07:00
Josh Matthews
5cc6a0bf32 rt: Make the C stack segment accessible to runtime users. 2013-04-21 22:41:43 +02:00
bors
6a31525c50 auto merge of #5990 : bjz/rust/rem-quot, r=catamorphism
This renaming, proposed in the [Numeric Bikeshed](https://github.com/mozilla/rust/wiki/Bikeshed-Numeric-Traits#rename-modulo-into-rem-or-remainder-in-traits-and-docs), will allow us to implement div and and modulo methods that follow the conventional mathematical definitions for negative numbers without altering the definitions of the operators (and confusing systems programmers). Here is a useful answer on StackOverflow that explains the difference between `div`/`mod` and `quot`/`rem` in Haskell: (When is the difference between quotRem and divMod useful?)[http://stackoverflow.com/a/339823/679485].

This is part of the numeric trait reforms tracked in issue #4819.
2013-04-21 12:54:51 -07:00
bors
535244cde4 auto merge of #5987 : huonw/rust/generic-random, r=catamorphism
With this patch `rand::random` can be used to generate anything that implements `Rand`.
2013-04-21 12:00:52 -07:00
bors
8942099614 auto merge of #5989 : Thiez/rust/fixbench, r=catamorphism
Partial fix for #5985
shootout-fasta-redux.rs was calling fwrite with u64 arguments that should have been size_t, which broke on 32-bit systems. I replaced the casts to u64 by casts to size_t.

r?
2013-04-21 11:12:53 -07:00
Brendan Zabarauskas
01eb5e8ad3 Rename Div operator trait to Quot and Modulo operator trait to Rem 2013-04-22 01:58:53 +10:00
Huon Wilson
aa763cdb23 libcore: make rand::random return a generic value implementing Rand. 2013-04-21 22:14:34 +10:00
Matthijs Hofstra
91d1d00367 Changed shootout-fasta-redux to use size_t when calling fwrite, removed XFAIL 2013-04-21 13:35:43 +02:00
bors
2104cd69d4 auto merge of #5986 : brson/rust/bench, r=brson 2013-04-20 23:51:51 -07:00
Brian Anderson
59caef02ed xfail two benchmarks that are failing on the bots 2013-04-20 23:49:42 -07:00
Alex Crichton
c389d0b0dd rustc: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00
Alex Crichton
fd97cac251 syntax: remove unused 'mut' variables 2013-04-20 21:03:24 -04:00