Commit Graph

15904 Commits

Author SHA1 Message Date
bors
f68335113b auto merge of #5002 : catamorphism/rust/one-tuples, r=graydon
r? @graydon - This is for greater uniformity (for example, macros that generate
tuples). rustc already supported 1-tuple patterns, but there was no
way to construct a 1-tuple term.

@graydon , as far as your comment on #4898 - it did turn out to be solvable inside the macro (since @luqmana already fixed it using structs instead), but I still think it's a good idea to allow 1-tuples, for uniformity. I don't think anyone is likely to trip over it, and I'm not too worried that it changes the amount of ambiguity.
2013-02-19 09:14:33 -08:00
Marvin Löbel
f684a8a56b Mention rust tool in the tutorial 2013-02-19 18:10:31 +01:00
Graydon Hoare
2ec958db5a test: fix seeded_rng uses 2013-02-19 08:56:37 -08:00
Kang Seonghoon
f513c567cb fix ICE after incorrect number of args in calls 2013-02-20 00:53:54 +09:00
Ted Horst
9ecb8a60ed update copyright dates 2013-02-19 09:53:03 -06:00
Ted Horst
45f34059af move shootout-mandelbrot to LinearMap, add depth argument 2013-02-19 09:49:23 -06:00
Graydon Hoare
acc147769e std: update rand-using tests, r=burningtree 2013-02-19 07:38:18 -08:00
Graydon Hoare
8eaf08357c rt: remove export of symbol removed in last commit, r=burningtree 2013-02-19 07:18:46 -08:00
Graydon Hoare
968ab03026 rt: fix memory-unsafe random seed logic, r=valgrindclean 2013-02-19 07:06:36 -08:00
bors
a8efa21333 auto merge of #5014 : Kimundi/rust/incoming, r=graydon
This implements a rust tool similar to go's go tool. It acts as a central hub for the tools rustc, rustdoc, rustpkg, rusti, and also provides shortcuts for directly compiling and running a source file either as a normal or a test executable. Default usage message:

```
The rust tool is a convenience for managing rust source code.
It acts as a shortcut for programs of the rust tool chain.

Usage:	rust <command> [arguments]

The commands are:

    build   compile rust source files
    run     build a executable, and run it
    test    build a test executable, and run it
    doc     generate documentation from doc comments
    pkg     download, build, install rust packages
    sketch  run a rust interpreter
    help    show detailed usage of a command

Use "rust help <command>" for more information about a command.
```
2013-02-19 06:18:42 -08:00
bors
67ee95e943 auto merge of #5029 : mcpherrinm/rust/master, r=catamorphism
Added a newline to make header be a header.

(re-did pull request because I screwed up the last one)
2013-02-19 00:08:31 -08:00
bors
28e8542c54 auto merge of #5028 : catamorphism/rust/bsd-breakage, r=catamorphism 2013-02-18 23:16:34 -08:00
bors
396f911925 auto merge of #5017 : catamorphism/rust/less-copy, r=catamorphism 2013-02-18 22:06:33 -08:00
bors
6e40314bbf auto merge of #5015 : mitsuhiko/rust/doc-fix-stringify, r=catamorphism
Fixed a typo in the documentation that points to the wrong macro.
2013-02-18 21:04:33 -08:00
Matthew McPherrin
b29476374b Missing newline causing title to not be a title 2013-02-18 23:22:36 -05:00
bors
24603afc93 auto merge of #5010 : youknowone/rust/match_const_typecheck, r=catamorphism
Fix of issue #4968
2013-02-18 20:18:34 -08:00
Tim Chevalier
dc30cc356b core: Fix BSD breakage, I hope 2013-02-18 20:12:17 -08:00
bors
6351515d98 auto merge of #5005 : alexcrichton/rust/bitv++, r=catamorphism
These commits take the old bitv implementation and modernize it with an explicit self, some minor touchups, and using what I think is some more recent patterns (like `::new` instead of `Type()`).

Additionally, this adds an implementation of `container::Set` on top of a bit vector to have as a set of `uint`s. I initially tried to parameterize the type for the set to be `T: NumCast` but I was hitting build problems in stage0 which I think means that it's not in a snapshot yet, so it's just hardcoded as a set of `uint`s now. In the future perhaps it could be parameterized. I'm not sure if it would really add anything, though, so maybe it's nicer to be hardcoded anyway.

I also added some extra methods to do normal bit vector operations on the set in-place, but these aren't a part of the `Set` trait right now. I haven't benchmarked any of these operations just yet, but I imagine that there's quite a lot of room for optimization here and there.
2013-02-18 18:40:33 -08:00
Armin Ronacher
c77c5c4674 Added is_restricted() to path 2013-02-19 01:54:05 +00:00
bors
9ba2e65fd6 auto merge of #5004 : luqmana/rust/rename-use-import, r=catamorphism
Seems like my previous pull request got lost along the way somehow. So here it is updated.
2013-02-18 17:48:34 -08:00
Tim Chevalier
aa284de1fc rustc: For one-tuples, make parsing and printing the type work
and add a test to reflect-visit-data
2013-02-18 17:45:56 -08:00
Armin Ronacher
b07eab5faa Improved windows path handling support 2013-02-19 01:34:48 +00:00
Marvin Löbel
702a6f7a18 Attempt to solve make check test ambiguity betwen crate 'rust' and extratected doc 'rust' 2013-02-19 02:22:14 +01:00
bors
d0b5016af2 auto merge of #5001 : jld/rust/test-pub-fn-main, r=catamorphism 2013-02-18 16:40:33 -08:00
Tim Chevalier
43dc67b74a rustc: Less copy in trans, rs=removing copies 2013-02-18 15:53:37 -08:00
bors
ec161edc16 auto merge of #4998 : thestinger/rust/vec, r=catamorphism 2013-02-18 15:48:34 -08:00
Armin Ronacher
c8d8f6cfec Refactored make_absolute into functionality on the Path 2013-02-18 22:48:18 +00:00
bors
df4273f874 auto merge of #4996 : luqmana/rust/no-rec-pipes, r=catamorphism
Removes the last use of structural records in the pipes extension and with that, libcore has no more structural records.
Also, explicit-self-ification.
2013-02-18 14:42:36 -08:00
Armin Ronacher
99c4de7300 Fixed a typo in the documentation that points to the wrong macro (ident_to_str -> stringify) 2013-02-18 22:40:01 +00:00
Marvin Löbel
726fc877d1 Added rust convenience tool similar to go's go tool 2013-02-18 23:11:08 +01:00
bors
1171a214a6 auto merge of #4979 : z0w0/rust/issue-1301, r=catamorphism 2013-02-18 13:50:36 -08:00
bors
a2068f1b21 auto merge of #4890 : jld/rust/enum-newtype-alignment, r=catamorphism 2013-02-18 10:02:48 -08:00
Jeong YunWon
092b6114c1 add missing typecheck for const pattern match arm
Issue #4968
2013-02-19 00:56:02 +09:00
Alex Crichton
cf2ddf0437 Add benchmarks to measure differences in bit vectors 2013-02-18 01:24:14 -05:00
Alex Crichton
bf8ed45adc Implement Set container on top of a bit vector 2013-02-17 23:09:21 -05:00
Alex Crichton
393a4b41f6 Favor local closures instead of global functions 2013-02-17 23:09:21 -05:00
Alex Crichton
dc7e6abab7 Remove the 'uint_bits' constant in bitv 2013-02-17 23:09:21 -05:00
Alex Crichton
a01ef8ef87 Change SmallBitv to use uint instead of u32 2013-02-17 23:09:20 -05:00
Alex Crichton
91fae27912 Modernize bitv mut fields and explicit self 2013-02-17 23:09:20 -05:00
Luqman Aden
5b5ac331db Long lines. 2013-02-17 21:53:29 -05:00
Luqman Aden
0f09c106f0 libsyntax: Update view_item_use/import to reflect actual usage 2013-02-17 21:45:00 -05:00
Tim Chevalier
612553cb39 syntax: Allow 1-tuple expressions
This is for greater uniformity (for example, macros that generate
tuples). rustc already supported 1-tuple patterns, but there was no
way to construct a 1-tuple term.
2013-02-17 15:52:05 -08:00
Jed Davis
9939d88e8d pub fn main for run-pass tests that didn't have it 2013-02-17 14:36:43 -08:00
Jed Davis
e8732bde5e Tests shouldn't read from stdin.
As far as I can tell, the only reason run-pass/type-use-i1-versus-i8
is trying to do a read is because that code was left over from the
original program the issue was found in.  When that test is run as
part of check-fast, and apparently only in that case, the test blocks
indefinitely, which is bad.
2013-02-17 14:32:46 -08:00
Jed Davis
7c34908e69 pub fn main 2013-02-17 12:20:42 -08:00
Jed Davis
d009c6330b Make univariant enums act like structs, so that they're aligned correctly.
Consts of such enums are aligned correctly, so we could either misalign
them to match the type_of, or fix the type_of.  The latter seems like a
better idea.
2013-02-17 12:20:42 -08:00
Daniel Micay
6956e81c9b vec: grow_fn doesn't require Copy 2013-02-17 14:09:09 -05:00
Luqman Aden
baeac2f9ac libsyntax: Long lines. 2013-02-17 05:25:26 -05:00
Luqman Aden
de57bacf43 libsyntax: Explicit-self-ify pipes compiler. 2013-02-17 05:25:26 -05:00
Luqman Aden
0126af3144 libsyntax: Remove last use of structural records in pipes compiler. 2013-02-17 05:25:26 -05:00