Commit Graph

16642 Commits

Author SHA1 Message Date
bors 4abd83b18d auto merge of #6985 : Aatch/rust/fixed-vec-6977, r=thestinger
This fixes #6977. Negative counts don't make sense anyway.
2013-06-06 20:34:32 -07:00
bors 74d9de7abd auto merge of #6979 : thestinger/rust/libc, r=brson
LLVM provides these functions as intrinsics, and will generate calls to
libc when appropriate. They are exposed in the `ptr` module as
`copy_nonoverlapping_memory`, `copy_memory` and `set_memory`.

@graydon: r?
2013-06-06 19:40:32 -07:00
bors 5d2cadbfea auto merge of #6895 : cmr/rust/jemalloc, r=brson 2013-06-06 18:43:37 -07:00
James Miller de27064d84 Disallow negative counts in repeat expressions 2013-06-07 12:30:44 +12:00
bors d6b4fde97e auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwalton
I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
2013-06-06 16:52:36 -07:00
James Miller 9c8d0e375e Provide an actual error when expanding macros to foreign items 2013-06-07 11:28:38 +12:00
bors 6a09b6f0c3 auto merge of #6981 : jbclements/rust/fold-traverses-macros, r=catamorphism
Fixes bug #2888 . Includes test cases

r? @catamorphism
2013-06-06 15:43:35 -07:00
bors 145279709d auto merge of #6980 : Kimundi/rust/iterator-collect3, r=thestinger 2013-06-06 14:46:41 -07:00
John Clements eff49fc48b implement fold traversing macros 2013-06-06 14:21:07 -07:00
John Clements 2d59ebadb9 add test cases for fold traversing macros 2013-06-06 14:21:07 -07:00
bors 533425e242 auto merge of #6053 : nikomatsakis/rust/fixme-2699, r=thestinger
r? @jld or @graydon

The calculation looks right to me, but perhaps one of you two can double check.  You two seem like you are doing the most recent work in this sort of area.
2013-06-06 13:52:41 -07:00
Marvin Löbel cac4891154 Fixups 2013-06-06 22:40:35 +02:00
Marvin Löbel 070015468d Removed IteratorUtil::to_vec and iter::to_vec 2013-06-06 22:11:48 +02:00
Marvin Löbel 857d433b9a Added IteratorUtil::collect 2013-06-06 22:11:48 +02:00
Marvin Löbel af2086a2f1 Added iter::FromIter 2013-06-06 22:11:47 +02:00
bors a51fae097f auto merge of #6937 : msullivan/rust/no-warnings, r=bstrie 2013-06-06 12:58:41 -07:00
Daniel Micay 8bcefef2f2 libc: omit memcpy, memmove and memset
LLVM provides these functions as intrinsics, and will generate calls to
libc when appropriate. They are exposed in the `ptr` module as
`copy_nonoverlapping_memory`, `copy_memory` and `set_memory`.
2013-06-06 15:18:45 -04:00
Michael Sullivan 8bbf83b62a Clean up a handful of build warnings. 2013-06-06 12:14:41 -07:00
bors 0e96369224 auto merge of #6968 : huonw/rust/takeskip-iter, r=thestinger
@thestinger r?

Adding the dummy parameter stops the inference from having to work so hard.
2013-06-06 10:07:41 -07:00
bors 021e6d38f0 auto merge of #6975 : artagnon/rust/tuple-tostr, r=bstrie
[1/2] fixes a couple of comments.
[2/2] uses fmt! instead of hand-concatenating strings in a couple of places.

No functional changes.
2013-06-06 09:13:44 -07:00
Ramkumar Ramachandra 01c4f11cf8 libstd: use fmt! in to_str impl for (one|two)-tuple
The three-tuple uses fmt!, and there's no reason to hand-concatenate
strings.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-06 20:50:29 +05:30
Ramkumar Ramachandra ab10b1ed29 libstd: fix comment in to_str impl of tuple
There is a pointer to #4760, which is a closed issue.  The real issue is
the more general problem described in #4653.  Correct the comment.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-06 20:50:29 +05:30
bors 8450dc8f5e auto merge of #6972 : artagnon/rust/bad-for-loop, r=bstrie
I noticed this while reading the tutorial.

[1/2] adds tests to guard against regressions.
[2/2] corrects the tutorial.

Please let me know if you have a standard place to put tests: they seem to be all over the place currently.
2013-06-06 07:46:47 -07:00
Ramkumar Ramachandra c2cb238075 test/compile-fail: clarify bad-for-loop
There are two distinct kinds of bad-for-loops to check for with two
distinct error messages.  The current bad-for-loop.rs does not make this
clear, so rewrite it into bad-for-loop{,-2}.rs.  The two failing
prototypes are:

  fn quux(_: &fn(&int) -> int) -> bool { true }
  fn quux(_: &fn(&int) -> bool) -> () { }

Note that the second one runs fine in rust-0.6 (the latest release), and
only fails with a rust built from `incoming`.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-06 19:23:52 +05:30
Philipp Brüschweiler 13df1198d5 infer: remove superfluous call to try() 2013-06-06 11:53:09 +02:00
Alexei Sholik e75572c879 Deduplicate words in code comments 2013-06-06 10:48:27 +03:00
Huon Wilson 32228f3d57 std: work-around for take/skip type inference (#6967) 2013-06-06 16:40:12 +10:00
bors 7e62ad6876 auto merge of #6964 : huonw/rust/vec-mut-iter, r=thestinger 2013-06-05 22:25:38 -07:00
Huon Wilson 848dbc93ee std: add an external iterator for mutating vec elements 2013-06-06 15:16:07 +10:00
bors 4a19af1b03 auto merge of #6960 : msullivan/rust/fix-pollution, r=brson 2013-06-05 19:55:36 -07:00
Michael Sullivan 1ebb62f591 Fix stat.rs to not pollute the build directory. Closes #6959. 2013-06-05 16:00:12 -07:00
bors 2c65e2e385 auto merge of #6956 : Blei/rust/fix-symbol-mangling, r=catamorphism
Handle more characters that appear in types, most notably <>): were
missing. Also the new scheme takes care that no two different input
strings result in the same mangled string, which was not the case before.

Fixes #6921
2013-06-05 14:13:43 -07:00
Philipp Brüschweiler eb62781720 rustc:🔙🔗 redo symbol mangling
Handle more characters that appear in types, most notably <>): were
missing. Also the new scheme takes care that no two different input
strings result in the same mangled string, which was not the case before.

Fixes #6921
2013-06-05 22:21:25 +02:00
John Clements 91b652695b moved TLS of sctable to ast_util, hid parameter in hygiene calls 2013-06-05 12:01:40 -07:00
John Clements fe6baa9023 added fresh-name fn 2013-06-05 12:01:40 -07:00
John Clements 5a158f1d19 add hygiene support functions 2013-06-05 12:01:40 -07:00
John Clements ecdb6e4722 remove unused get_ident_interner's 2013-06-05 12:01:40 -07:00
John Clements 8dad2bb281 removed unused imports (and one unused argument) 2013-06-05 12:01:39 -07:00
John Clements 367eddf5b1 remove interner field from string_reader 2013-06-05 12:01:39 -07:00
John Clements 19cbd0d284 remove interner from tt_reader 2013-06-05 12:01:39 -07:00
John Clements be22fddba0 rand example fixup 2013-06-05 12:01:39 -07:00
John Clements c88f337fc9 remove unused cx's 2013-06-05 12:01:39 -07:00
John Clements 04a691a511 token_to_ident takes argument by reference 2013-06-05 12:01:38 -07:00
John Clements 3203595471 interner just uses uints, not idents with syntax context 2013-06-05 12:01:38 -07:00
John Clements ae02bf70e0 removed some interner fields 2013-06-05 12:01:38 -07:00
John Clements 1537056982 just use TLS interner 2013-06-05 12:01:37 -07:00
John Clements 22d21ab4c2 rename repr to name 2013-06-05 12:01:37 -07:00
John Clements 7266981b4c removed obsolete reference to purity 2013-06-05 12:01:37 -07:00
John Clements e99657c7e7 parser comments 2013-06-05 12:01:37 -07:00
John Clements b24b453e4a comments & whitespace 2013-06-05 12:01:37 -07:00