Commit Graph

1064 Commits

Author SHA1 Message Date
Erick Tryzelaar
5f1652f34f libsyntax: remove vecs_implicitly_copyable from the printer 2013-02-26 20:48:11 -08:00
Erick Tryzelaar
4ae91e2961 libsyntax: add explicit copies 2013-02-26 20:48:11 -08:00
Erick Tryzelaar
8d239a256d libsyntax: change closures to take fn(&Parser) 2013-02-26 20:48:06 -08:00
bors
99a902c81d auto merge of #5120 : jbclements/rust/macros-have-scope, r=pcwalton
r?

After this patch, macros declared in a module, function, or block can only be used inside of that module, function or block, with the exception of modules declared with the #[macro_escape] attribute; these modules allow macros to escape, and can be used as a limited macro export mechanism.

This pull request also includes miscellaneous comments, lots of new test cases, a few renamings, and a few as-yet-unused data definitions for hygiene.
2013-02-26 20:00:38 -08:00
John Clements
6aefaf22c7 typo-fixing and name-changes 2013-02-26 15:48:00 -08:00
John Clements
08b6057538 Macros now leave scope
Macro scope is now delimited by function, block, and module boundaries,
except for modules that are marked with #[macro_escape], which allows
macros to escape.
2013-02-26 10:36:55 -08:00
John Clements
5e319fb282 Adds (more) test cases for auto_encode. 2013-02-26 10:26:42 -08:00
Patrick Walton
24893e8d02 libsyntax: Stop parsing ~mut 2013-02-26 04:18:12 -08:00
Patrick Walton
9b8ce0d3b5 libsyntax: Remove a mutable field from the tests. rs=demuting 2013-02-26 04:18:11 -08:00
Erick Tryzelaar
375c298297 libsyntax: change binop_to_str to be pure 2013-02-26 03:22:14 -08:00
Erick Tryzelaar
de6d9f66b5 libsyntax: change token_is_word to take &Token 2013-02-26 02:58:39 -08:00
Erick Tryzelaar
34c02a6c0e libsyntax: change Parser::unexpected_last to take &Token 2013-02-26 02:36:21 -08:00
Erick Tryzelaar
28691a0852 libsyntax: more minor cleanup 2013-02-26 02:14:01 -08:00
Erick Tryzelaar
ff36986fa4 libsyntax: change token fns to take &Token 2013-02-26 01:51:41 -08:00
Erick Tryzelaar
d346b51997 libsyntax: change token::to_str to take &Token 2013-02-26 01:29:27 -08:00
Erick Tryzelaar
194f29c20f libsyntax: minor cleanup 2013-02-26 01:07:09 -08:00
Erick Tryzelaar
380597eba3 libsyntax: change parse_matcher_subseq to take &Token 2013-02-26 00:44:49 -08:00
Erick Tryzelaar
cf6e21a17f libsyntax: change attr::parse_seq_* to take &Token 2013-02-26 00:22:30 -08:00
Erick Tryzelaar
3180d22dde libsyntax: change parse_trait_ref_list to take a &Token 2013-02-26 00:00:04 -08:00
Erick Tryzelaar
bff22cf166 libsyntax: add some explicit copies 2013-02-25 23:37:45 -08:00
Erick Tryzelaar
752befe2a6 libsyntax: change token_is_{word,keyword} to take &Token 2013-02-25 23:15:22 -08:00
Erick Tryzelaar
272c25e938 libsyntax: minor cleanup 2013-02-25 22:52:57 -08:00
Erick Tryzelaar
3635480b15 libsyntax: change expect to take &token::Token 2013-02-25 22:30:32 -08:00
Erick Tryzelaar
f3965829ff libsyntax: change flip_delimiter to take a &token::Token 2013-02-25 22:08:09 -08:00
Erick Tryzelaar
4650da5888 libsyntax: change eat to take a &token 2013-02-25 21:45:46 -08:00
Erick Tryzelaar
1deb858b22 libsyntax: is_keyword should take a &~str 2013-02-25 21:23:21 -08:00
Erick Tryzelaar
8b94ef0302 libsyntax: fix the span in parse_bottom_expr's INTERPOLATED handler 2013-02-25 21:00:53 -08:00
Ben Striegel
abc4ea2001 Stop parsing capture clauses 2013-02-25 19:49:28 -05:00
Erick Tryzelaar
d20438695e libsyntax: make lexer vecs_implicitly_copyable-free 2013-02-25 08:12:01 -08:00
Erick Tryzelaar
f14409c528 libsyntax: progress on making syntax::visit vecs_implicitly_copyable-free 2013-02-25 07:49:34 -08:00
Erick Tryzelaar
9ac5262bdf libsyntax: convert visit to pass ty_params by reference 2013-02-25 07:27:01 -08:00
Erick Tryzelaar
297c6e11bb libsyntax: minor cleanup 2013-02-25 07:03:48 -08:00
Erick Tryzelaar
44f5537abf libsyntax: add explicit modes where required to copy strs/vecs 2013-02-25 06:40:53 -08:00
Erick Tryzelaar
5b9e110eab libsyntax: Convert ast::attribute_ to store a @meta_item 2013-02-25 06:19:44 -08:00
Patrick Walton
a07192fadd libsyntax: Remove all mutable fields from libsyntax. rs=demuting 2013-02-22 16:09:16 -08:00
Patrick Walton
934c938f90 libsyntax: De-mut the parser. rs=demuting 2013-02-22 16:09:16 -08:00
Patrick Walton
77dc3ad810 libsyntax: De-mut the macro parser. rs=demuting 2013-02-22 16:09:16 -08:00
Patrick Walton
17dcaee9d1 libsyntax: De-mut the pipe compiler 2013-02-22 16:09:15 -08:00
bors
c316189d15 auto merge of #5081 : brson/rust/pipes, r=pcwalton
r?
2013-02-22 11:24:38 -08:00
bors
cec1f38c30 auto merge of #5077 : jbclements/rust/increase-monomorphization-depth-limit, r=catamorphism
It appears that using deriving_eq/auto_encode on ASTs bumps up against the "gee this looks like infinite unfolding" limit of 10 in monomorphization. Increasing it to 30 seems to solve this problem for me....

Also, commenting and a few renames.
2013-02-21 19:36:35 -08:00
bors
e7924ce18f auto merge of #5076 : pcwalton/rust/demuting, r=pcwalton 2013-02-21 18:27:32 -08:00
Brian Anderson
dab6a85230 core: Extract comm from pipes. #4742 2013-02-21 17:36:54 -08:00
bors
f5cc0b9830 auto merge of #5075 : luqmana/rust/derec, r=catamorphism
Now only `lib core/pipes.rs` has `#[allow(structural_records)]`. That can be removed after a snapshot.
2013-02-21 17:30:32 -08:00
bors
ab784b7de5 auto merge of #5059 : Kimundi/rust/incoming, r=catamorphism
compiles-as-is, but needs a snapshot to remove the `stage0`ed extfmt export in core.

Closes #4750
2013-02-21 16:42:35 -08:00
John Clements
27b06777e6 Cleanup, commenting, trivial renaming 2013-02-21 16:17:06 -08:00
Patrick Walton
553c27c515 librustc: De-mut some of trans 2013-02-21 15:45:55 -08:00
Luqman Aden
9ea6a49696 Remove the last bits of structural records from tests/rustc/rusti/rustpkg. 2013-02-21 15:19:40 -08:00
bors
e0767bf24f auto merge of #5068 : sethpink/rust/derive-eq-tuple-struct, r=catamorphism
Previously an unimplemented error was thrown when using #[deriving_eq] on tuple-like struct definitions.
2013-02-21 12:30:34 -08:00
bors
4a5e8c5218 auto merge of #5071 : luqmana/rust/derec, r=pcwalton
Rid libsyntax of records and get rid of the last piece in `librustc/front/test.rs`.
2013-02-21 09:20:43 -08:00
Patrick Walton
c0defda499 librustc: Separate the rest of the trait bounds with + and stop parsing space-separated ones. rs=plussing 2013-02-21 08:29:48 -08:00
Marvin Löbel
3792eb2a38 Moved core::extfmt to core::private::extfmt
Needs a snapshot to remove stage0 extfmt export in core
2013-02-21 13:32:20 +01:00
Luqman Aden
b02f5c2090 Get rid of structural records in libsyntax and the last bit in librustc. 2013-02-21 00:19:15 -08:00
Seth Pink
6f9eb6aa3c Implement #[deriving_eq] on tuple like structs 2013-02-21 15:32:20 +10:00
Patrick Walton
bf2a225c0b librustc: Separate most trait bounds with '+'. rs=plussing 2013-02-20 21:14:20 -08:00
Luqman Aden
cd82c4566b librustc: Get rid of structural records save for front/test.rs. 2013-02-20 18:45:50 -08:00
bors
1f956fc3b2 auto merge of #4999 : erickt/rust/incoming, r=brson
This patch series is doing a couple things with the ultimate goal of removing `#[allow(vecs_implicitly_copyable)]`, although I'm not quite there yet. The main change is passing around `@~str`s in most places, and using `ref`s in others. As far as I could tell, there are no performance changes with these patches, and all the tests pass on my mac.
2013-02-19 12:24:30 -08:00
Erick Tryzelaar
e95f21f7be convert SyntaxExtensions's key to a @~str 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
de5fdaf934 convert ast::meta_items to take @~strs 2013-02-19 10:02:52 -08:00
Erick Tryzelaar
a2b754788d convert syntax::attr to use @~strs 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
1808d747f6 Alias HashMap<~str, SyntaxExtension> to SyntaxExtensions 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
27e235b64a libsyntax and librustc: minor cleanup 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
1a5b8e4aba libsyntax: change attr:get_attr_name to take a ref 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
bc62bd3782 libsyntax: make enum variants take refs 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
59ba4fc104 syntax: fix the indentation of a function 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
e6d84268fa Change functions from taking ~str to taking &str 2013-02-19 10:02:51 -08:00
Erick Tryzelaar
9da641bd8c libsyntax: convert interner into a modern struct 2013-02-19 10:02:50 -08:00
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
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
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
Alex Crichton
91fae27912 Modernize bitv mut fields and explicit self 2013-02-17 23:09:20 -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
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
bors
9ea05a4d3e auto merge of #4978 : z0w0/rust/issue-607, r=graydon 2013-02-16 22:39:29 -08:00
Zack Corr
fe9f1d155a syntax: Implement recursive sorting of meta items. Closes #607 2013-02-17 00:31:57 +10:00
Niko Matsakis
6c728e32c0 Parse (and discard) lifetime declarations on function types 2013-02-16 08:03:58 -05:00
Niko Matsakis
c7f85003a3 Permit lifetimes to appear in type parameter lists and after &. Lifetimes in
type parameter lists are currently ignored, but `&'a T` is equivalent to
`&a/T`.
2013-02-16 08:01:10 -05:00
Patrick Walton
bb833ca0f0 librustc: Stop parsing impl Type : Trait and fix several declarations that slipped through. r=tjc 2013-02-15 16:59:56 -08:00
bors
566bcf2225 auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
Issue #3869
review? @nikomatsakis 

Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error.  `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
Luqman Aden
3a19eef496 libsyntax: Remove move as a keyword. 2013-02-15 02:49:55 -08:00
Luqman Aden
e244f103c9 libsyntax: Get rid of uses of move and don't parse it. 2013-02-15 02:49:55 -08:00
bors
172c29fe0a auto merge of #4941 : nickdesaulniers/rust/issue4524cleanup, r=catamorphism
review? @brson
Issue #4524
2013-02-14 21:12:06 -08:00
Nick Desaulniers
13fe167dbb remove die definition and use in doc tests 2013-02-14 17:33:16 -08:00
bors
af2f0ef088 auto merge of #4927 : sanxiyn/rust/remove-dvec, r=catamorphism 2013-02-14 17:23:18 -08:00
bors
bf27352953 auto merge of #4911 : lifthrasiir/rust/comment-exemptions, r=catamorphism
This is a natural extension of #4887, and handles the following three cases:

~~~~
a line with only /s
////////////////////////////////////////////

a line with only /s followed by whitespace
////////////////////////////////////////////         

a block comment with only *s between two /s
/********************************/
~~~~
2013-02-14 16:34:38 -08:00
Nick Desaulniers
5d62a4a52e Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -08:00
Patrick Walton
9143688197 librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
Seo Sanghyeon
7a6db3f982 Remove DVec from syntax::parse 2013-02-14 22:14:59 +09:00
bors
6efa3543a8 auto merge of #4922 : jbclements/rust/add-deriving-eq-to-asts, r=catamorphism
r?

Apply deriving_eq to the data structures in ast.rs, and get rid of the custom definitions of eq that were everywhere. resulting ast.rs is about 400 lines shorter.

Also: add a few test cases and a bunch of comments.

Also: change ast_ty_to_ty_cache to use node ids rather than ast::ty's. I believe this was a suggestion related to my changes, and it appears to pass all tests.

Also: tiny doc fix, remove references to crate keywords.
2013-02-13 18:49:29 -08:00
Nick Desaulniers
4445b38df2 Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -08:00
John Clements
f9d789fa08 cleanup, fix test case 2013-02-13 15:38:42 -08:00
Patrick Walton
754718c910 libsyntax: Pretty print using the new impl syntax. r=brson 2013-02-13 15:23:48 -08:00
John Clements
9d962d8466 add test case 2013-02-13 15:08:27 -08:00
John Clements
ded95d2c28 deriving_eq for tokens and binops
Note that the replaced definition of equality on tokens
contains a *huge* shortcut on INTERPOLATED tokens (those
that contain ASTs), whereby any two INTERPOLATED tokens
are considered equal. This seems like a really broken
notion of equality, but it appears that the existing
test cases and the compiler don't depend on it. Niko
noticed this, BTW.

Replace long definition of Eq on tokens and binops
w
2013-02-13 15:08:27 -08:00
John Clements
0419e36b76 finish deriving_eq in ast 2013-02-13 15:08:27 -08:00
John Clements
819c6d1c04 deriving-eq all over ast 2013-02-13 15:08:27 -08:00
John Clements
17d3a55362 @mut fix 2013-02-13 15:08:27 -08:00
John Clements
25c4676dfa Commenting, test cases, cleanup 2013-02-13 15:08:27 -08:00
bors
5e6d7871c6 auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catamorphism
r?

I added code to the JSON encoder to support the serialization of enums.  Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred.

Also, added test cases.
2013-02-13 13:18:38 -08:00
John Clements
9df11ae83f retabbing 2013-02-13 10:49:36 -08:00
Kang Seonghoon
6d98ca94cc libsyntax: don't parse ////, /***/ as doc comments 2013-02-13 11:39:13 +09:00
John Clements
46d2be1bd4 added rather elaborate test framework 2013-02-12 17:18:29 -08:00
Brian Anderson
8ed1c15845 Fix license block 2013-02-11 15:01:24 -08:00
Mikko Perttunen
ca030b4fc8 Update copyright years 2013-02-11 21:02:36 +02:00
Mikko Perttunen
f2a8a71266 Use topmost span for macro expansion location. Fixes behaviour of file!, line! and col! 2013-02-11 20:23:40 +02:00
bors
9d7014e55c auto merge of #4861 : sethpink/rust/incoming, r=catamorphism
Fix for issue #4830.
2013-02-09 18:37:02 -08:00
bors
d6442e97a5 auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism 2013-02-09 15:02:51 -08:00
John Clements
394f8eeb7e tidy 2013-02-09 13:37:04 -08:00
John Clements
765961438d fix typos in sample code, add enum to json encoder, add test case 2013-02-09 13:37:04 -08:00
Seth Pink
8ebdb3d0ab Issue #4830 fix 2013-02-09 23:00:55 +10:00
Daniel Micay
d30fdbb357 libsyntax/attr.rs: switch from oldmap to LinearSet 2013-02-08 20:57:14 -05:00
Daniel Micay
a32c5c73ee oldmap: get rid of legacy _ref suffixes 2013-02-08 19:12:51 -05:00
Matthijs Hofstra
8d0c1cb406 Added related FIXME for 3260 2013-02-09 01:01:39 +01:00
Matthijs Hofstra
fd98ea8129 Fix for issue 2174
The function that formats and prints the squigly line that hilights
errors counted tabs as spaces, which resulted in incorrect error
messages when tabs were used for indentation. This change compares
the highlight line with the previous line and inserts a tab instead
of a space whenever such a tab exists on the previous line. Note
that error messages will still highlight incorrectly when the
previous line include characters that require more than one utf8
code point, as mentioned in issue 3260.
2013-02-09 00:57:39 +01:00
Niko Matsakis
14930fbffe Add and lex LIFETIME tokens
cc #4846
2013-02-08 06:02:35 -08:00
Patrick Walton
472797b04a librustc: Lots of de-muting. rs=demuting 2013-02-07 16:17:39 -08:00
bors
4272765830 auto merge of #4791 : jbclements/rust/demodeing-and-deGCing, r=jbclements,brson
r?

It looks to me like the string_reader and tt_reader structs are
GC pointers only because they predate the modern borrow system.
This commit leaves the type names string_reader and tt_reader alone
(they still refer to GC-ed pointers), but internally the functions
now use borrowed pointers to refer to these structures. My guess
would be that it's possible to move this change outward and not
use the GCed pointers at all, but that change looks like it could be
a larger one. Actually, I'm delighted at how quick this change was.
2013-02-07 13:58:32 -08:00
Niko Matsakis
a32498d846 Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update.

Part of #3678.  Fixes #2828, #3904, #4719.
2013-02-07 05:53:30 -08:00
Kang Seonghoon
01cc9ecafe libsyntax: no binary/hex float literals 2013-02-06 16:49:24 +09:00
Patrick Walton
801f3225b2 oldmap: use &K instead of K in find and get
This reverts commit a4250a96fd.

This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd Revert "oldmap: use &K instead of K in find and get"
This reverts commit 8e643525d4.
2013-02-05 14:30:53 -08:00
Tim Chevalier
33e2c979ce Merge branch 'incoming' into removing 2013-02-05 10:33:35 -08:00
John Clements
61827a7020 lines too long 2013-02-04 21:00:17 -08:00
John Clements
b4138c1151 demodeing, un-gc-ing
It looks to me like the string_reader and tt_reader structs are
GC pointers only because they predate the modern borrow system.
This commit leaves the type names string_reader and tt_reader alone
(they still refer to GC-ed pointers), but internally the functions
now use borrowed pointers to refer to these structures. My guess
would be that it's possible to move this change outward and not
use the GCed pointers at all, but that change looks like it could be
a larger one. Actually, I'm delighted at how quick this change was.
2013-02-04 21:00:17 -08:00
Tim Chevalier
2f46b763da core/syntax: Staging fixes 2013-02-04 17:42:19 -08:00
bors
bffe3088c7 auto merge of pull req #4777 from thestinger/rust, r=graydon 2013-02-04 17:24:40 -08:00
Tim Chevalier
4e45d7111c syntax: Make the pipe compiler stop generating set_buffer_ calls 2013-02-04 15:18:53 -08:00
Tim Chevalier
e22aa029fb core/syntax: Add transitional code for pipes 2013-02-04 15:18:53 -08:00
Brian Anderson
e08a805b30 Merge remote-tracking branch 'bstrie/rimov' into incoming
Conflicts:
	src/libsyntax/parse/parser.rs
	src/test/bench/graph500-bfs.rs
	src/test/bench/sudoku.rs
	src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
	src/test/run-pass/empty-mutable-vec.rs
	src/test/run-pass/foreach-nested.rs
	src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Brian Anderson
27e1ac5bb9 Merge pull request #4684 from erickt/incoming
core: convert ToStr::to_str to take explicit &self
2013-02-04 10:15:02 -08:00
Patrick Walton
31f6534952 libsyntax: Add explicit self to ast_util. rs=explicit-selfing 2013-02-04 09:07:00 -08:00
Erick Tryzelaar
9adfa59d8e core: convert ToStr::to_str to take explicit &self 2013-02-03 20:47:26 -08:00
Daniel Micay
8e643525d4 oldmap: use &K instead of K in find and get 2013-02-03 23:30:56 -05:00
Brian Anderson
3b396d17d6 Merge remote-tracking branch 'thestinger/old_map' into incoming
Conflicts:
	src/test/bench/core-map.rs
2013-02-03 17:56:49 -08:00
Marvin Löbel
eb19462104 Converted libcore/uint-template.rs to the new string functions.
- Moved ToStr implementation of unsigned integers to uint-template.rs.
- Marked the `str()` function as deprecated.
- Forwarded all conversion functions to `core::num::to_str_common()`
  and `core::num::from_str_common()`.
- Fixed most places in the codebase where `to_str()` is being used.
- Added uint-template to_str and from_str overflow tests.
2013-02-03 15:37:24 -08:00
Daniel Micay
2e496818a5 oldmap: get rid of the legacy each_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
f4a27b2c7d oldmap: get rid of the legacy contains_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
319eeb1c79 rename map -> oldmap and mark it as deprecated
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Brian Anderson
04f93be158 Fix breakage 2013-02-01 15:24:16 -08:00
Brian Anderson
9dc6938292 Merge remote-tracking branch 'nickdesaulniers/issue4524' into nocomm1 2013-02-01 11:18:58 -08:00
Nick Desaulniers
7868b6bf55 Remove fail keyword from lexer & parser and clean up remaining calls to
fail

Fix merge conflicts - Issue 4524
2013-02-01 00:15:42 -08:00
John Clements
a2839246be cleanup for make check 2013-01-31 23:05:12 -08:00
John Clements
4af7c643f2 more cleanup 2013-01-31 23:05:12 -08:00
John Clements
53688addaa test cases, cleanup 2013-01-31 23:05:12 -08:00
Nick Desaulniers
aee7929469 Replace most invocations of fail keyword with die! macro 2013-01-31 20:12:49 -08:00
Niko Matsakis
71478f9ce3 Workaround for #4717: pad contents of ast. rs=breakage 2013-01-31 16:56:12 -08:00
Niko Matsakis
0682ad0eb9 Finalize moves-based-on-type implementation.
Changes:

- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
  (though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
  (see details below)

Future work (I'll open bugs for these...):

- Improve error messages for moves that are due
  to bindings
- Add support for moving owned content like a.b.c
  to borrow check, test in trans (but I think it'll
  "just work")
- Proper fix for def-ids in params

Def ids in params:

Move captures into a map instead of recomputing.

This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining.  I am
not sure of my preferred fix for the larger bug yet.  This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00