Commit Graph

930 Commits

Author SHA1 Message Date
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