Commit Graph

539 Commits

Author SHA1 Message Date
Philipp Brüschweiler
e7e1bab27f libsyntax: refactor the parser to consider foreign items as items
parse_item_or_view_item() would drop visibility if none of the conditions
following it would hold. This was the case when parsing extern {} blocks,
where the function was only used to parse view items, but discarded the
visibility of the first not-view item.
2012-10-17 15:34:55 -07:00
Tim Chevalier
b532a8e585 Line length 2012-10-17 12:03:18 -07:00
Tim Chevalier
7236472e67 word => word_space 2012-10-17 12:03:18 -07:00
Jyun-Yan You
66151d02f5 remove duplicate visibility and fix indentation 2012-10-17 12:03:18 -07:00
Jyun-Yan You
ca5506a5de fix the indentation of foreign constant 2012-10-17 12:03:18 -07:00
Patrick Walton
91ae5412d8 rustc: Merge module and type namespaces. r=brson 2012-10-15 15:35:36 -07:00
Tim Chevalier
7237268b70 Allow enum discriminator exprs to refer to declared consts
Also some work towards #3521

Closes #2428
2012-10-15 12:28:29 -07:00
Erick Tryzelaar
ab89b5c294 libstd: make Serializer a trait-level typaram 2012-10-15 08:25:23 -07:00
Tim Chevalier
c5fa613498 Make moves explicit in libsyntax 2012-10-12 20:43:37 -07:00
Tim Chevalier
335e5ca33b Add a colon, make an error message clearer 2012-10-12 20:43:37 -07:00
Niko Matsakis
98887cc7ee remove ctor from ast (take 2) (no review: just dead code removal) 2012-10-12 19:46:37 -07:00
Niko Matsakis
cb55e246ba Use the Nth impl when translating a static method call, instead
of the 0th.  0th is only correct when there are no bound tps
on the trait.

Fixes #3741.
2012-10-12 17:46:43 -07:00
Graydon Hoare
57b4d10ff6 bump version to 0.5. 2012-10-12 16:41:32 -07:00
Kevin Cantu
1bede1f5e0 Replace several common macros of the form #m[...] with m!(...)
This commit replaces nearly all remaining uses of #fmt, #debug, #error,
and #info, and fixes some error messages...
2012-10-12 14:14:48 -07:00
Tim Chevalier
ec6311211f Update FIXME number 2012-10-11 16:00:30 -07:00
Tim Chevalier
6854265161 Remove comment that is now false 2012-10-11 16:00:30 -07:00
Tim Chevalier
bfbb7197d7 Update FIXME numbers 2012-10-11 16:00:30 -07:00
Tim Chevalier
5a8ba073bc Make to_str pure and fix const parameters for str-mutating functions
Two separate changes that got intertwined (sorry):

Make to_str pure. Closes #3691

In str, change functions like push_char to take an &mut str instead of
an &str. Closes #3710
2012-10-11 14:17:59 -07:00
Tim Chevalier
15d8457104 Merge pull request #3700 from erickt/cargo-interner
allow interner cache to be shared across parsers (#3699)
2012-10-09 14:50:01 -07:00
Tim Chevalier
22efa39382 Revert "Revert "Remove old auto_serialize2 code (needs snapshot)""
This reverts commit a33535e441.
2012-10-08 17:43:45 -07:00
Tim Chevalier
a33535e441 Revert "Remove old auto_serialize2 code (needs snapshot)"
This reverts commit 0bd6da8a8c.
2012-10-08 11:58:54 -07:00
Erick Tryzelaar
1ac75d2269 allow interner cache to be shared across parsers (#3699) 2012-10-08 10:42:13 -07:00
Niko Matsakis
ed3689d57c remove ctor from ast 2012-10-08 06:36:42 -07:00
Erick Tryzelaar
0bd6da8a8c Remove old auto_serialize2 code (needs snapshot) 2012-10-07 17:20:19 -07:00
Erick Tryzelaar
eb626e7119 Remove the old serializers (needs snapshot) 2012-10-07 17:20:19 -07:00
Erick Tryzelaar
d301dd3686 remove the old auto_serialize syntax extension 2012-10-07 14:56:18 -07:00
Erick Tryzelaar
e1c517ca48 migrate libsyntax/rustc to auto_serialize2 2012-10-07 10:32:25 -07:00
Tim Chevalier
f96a2a2ca1 Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Tim Chevalier
05999290e2 Finally removing all uses of by-mut-ref
The code for the mode itself is still there.
2012-10-05 21:03:40 -07:00
Tim Chevalier
45345bda6a Remove uses of mutable ref mode.
It's still in the compiler right now, but warned about
2012-10-05 16:57:37 -07:00
Tim Chevalier
f8bc0d2545 Revert "wip"
This reverts commit ca49fd402a.
2012-10-05 16:10:08 -07:00
Tim Chevalier
ca49fd402a wip 2012-10-05 15:39:12 -07:00
Tim Chevalier
e16dbb7888 Demode some code using by-mutbl-ref; warn about by-mutbl-ref
The parser now warns about use of mutbl-ref mode, though it's kind
of a lie since this commit doesn't remove support for the mode.

Changed move_val_init to have stage0 and stage1/2 versions, the latter of
which is demoded.

Changed the type that the typechecker expects the move_val_init
intrinsic to have. After this is pushed, I can make a new snapshot,
which will remove the need for the stage0 versions.
2012-10-05 15:37:01 -07:00
Tim Chevalier
8fc60af441 Remove by-copy mode from std, mostly
One instance remains in net_tcp due to a foreign fn. Lots of
instances remain in serialization.rs, but IIRC that is being removed.

I had to do unholy things to task-perf-word-count-generic to get it
to compile after demoding pipes. I may well have messed up its
performance, but it passes.
2012-10-04 19:59:47 -07:00
Patrick Walton
2f451a7bd7 rustc: Only allow imports marked with "pub" to be imported from other modules 2012-10-02 18:15:19 -07:00
Patrick Walton
9284179311 libstd: Switch off legacy modes in both core and std. 2012-10-02 12:20:06 -07:00
Erick Tryzelaar
2569adc5ea Split auto_serialize2 into two macros 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
4f4160ee3b Factor out auto_serialize2's impls from each other. 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
c46b6f9efb auto_serialize2 should deserialize structs using read_struct 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
81423a3866 Add deserializable and more types to serialization2 2012-10-01 20:43:59 -07:00
Tim Chevalier
b18320446e Move over to calling ptr::addr_of
Everything should now call ptr::addr_of instead of
ptr::p2::addr_of. Only the pipes macro code when compiled
by stage0 will call ptr::p2::addr_of. Needs a snapshot to get
rid of that.
2012-10-01 15:12:09 -07:00
Tim Chevalier
72ae42627b Call 'new' instead of 'old' extfmt code, preparing for snapshot 2012-10-01 15:12:09 -07:00
Tim Chevalier
3639d38d5c Add a demoded version of ptr::addr_of
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.

core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00
Brian Anderson
c9fb1b19aa Add allow(deprecated_\*) to syntax, rustc, rustdoc, et al 2012-09-28 18:38:59 -07:00
Tim Chevalier
fec96b2ae0 Demoding in iter: any, all, map_to_vec, flat_map_to_vec, filter_to_vec 2012-09-28 17:44:15 -07:00
Niko Matsakis
565b39b302 rename iter2 to each2, make it follow iterator protocol 2012-09-28 16:13:03 -07:00
Brian Anderson
9e0a43c932 Pretty-print item visibility modifiers 2012-09-28 15:04:23 -07:00
Tim Chevalier
2f4ee89119 Demode extfmt
Needs a snapshot before this can be completed, because I changed
the mode for conv_poly.
2012-09-28 13:47:45 -07:00
Niko Matsakis
21519bc7e0 demode vec 2012-09-28 13:27:45 -07:00
Erick Tryzelaar
b68d287780 libsyntax: Fix long line 2012-09-27 19:24:11 -07:00