Erick Tryzelaar
b26ae289d0
syntax: Fix parsing global generics ( Closes #5572 )
2013-03-27 07:04:14 -07:00
Erick Tryzelaar
4d995e66a2
std: change default json enum encoder to use strings or a flat vec
2013-03-27 07:04:12 -07:00
Erick Tryzelaar
b10b8c3ee4
std: Add tests for json decoding options
2013-03-27 07:04:11 -07:00
Niko Matsakis
2c17ff7dbc
Simplify and remove unnecessary use of ast_map
2013-03-27 07:10:04 -04:00
Niko Matsakis
aa67deff33
remove sty_by_ref, though traces still remain due to dtors
2013-03-27 07:09:16 -04:00
Patrick Walton
0a4d0f37ca
librustc: Enforce that extern mod
directives come first, then use
directives, then items.
...
Resolve them in this order as well.
2013-03-26 21:30:17 -07:00
Patrick Walton
8b56a8380b
librustc: Modify all code to use new lifetime binder syntax
2013-03-26 21:30:17 -07:00
Patrick Walton
a376f46862
librustc: Stop parsing [T * N]
.
2013-03-26 21:29:35 -07:00
Patrick Walton
142dbd65da
librustc: Remove all uses of the old [T * N]
fixed-length vector syntax
2013-03-26 21:29:34 -07:00
Patrick Walton
46d4cc12d1
libsyntax: Stop parsing [const T]
.
2013-03-26 21:29:34 -07:00
Alex Crichton
e4c3d805a4
syntax: Removing uses of HashMap
2013-03-26 19:20:02 -04:00
Marvin Löbel
b9de2b5787
Switched over a bunch of splitting funktions to non-allocating iterators
2013-03-26 14:59:17 +01:00
Patrick Walton
e2fde83ce4
libsyntax: Stop parsing old lifetime syntax
2013-03-22 22:24:36 -07:00
Patrick Walton
68cb53672b
libsyntax: Stop parsing const
.
2013-03-22 22:24:35 -07:00
Patrick Walton
85c9fc6f8f
librustc: Remove the const
declaration form everywhere
2013-03-22 22:24:35 -07:00
Patrick Walton
eba3367404
libsyntax: Introduce the new assert!
macro; make assert
no longer a keyword
2013-03-22 22:24:34 -07:00
Patrick Walton
fa70709e07
libsyntax: Stop parsing pure
and static
2013-03-22 22:24:33 -07:00
bors
e9b077c0e9
auto merge of #5488 : pcwalton/rust/depure, r=pcwalton
2013-03-22 13:00:56 -07:00
Patrick Walton
e7c60c141b
librustc: Remove pure
from libsyntax and librustc.
2013-03-22 12:57:27 -07:00
bors
b6f9aa1fd7
auto merge of #5483 : pcwalton/rust/static-syntax, r=graydon
...
r? @nikomatsakis
2013-03-22 11:21:48 -07:00
Andrew Paseltiner
e2abecd3ab
syntax: replace uses of old deriving attribute with new one
2013-03-22 06:30:59 -04:00
bors
d52408d46a
auto merge of #5480 : pcwalton/rust/at-const, r=pcwalton
...
r? @catamorphism
2013-03-21 20:39:51 -07:00
bors
5f2d4102c5
auto merge of #5479 : Kimundi/rust/str-dealloc, r=z0w0
...
This makes the `trim` and `substr` functions return a slice instead of an `~str`, and removes the unnecessary `Trimmable` trait (`StrSlice` already contains the same functionality).
Also moves the `ToStr` implementations for the three str types into the str module in anticipation of further untangling.
2013-03-21 19:39:53 -07:00
Patrick Walton
94327d00c6
librustc: Replace the &static
bound with 'static
2013-03-21 17:31:35 -07:00
Patrick Walton
02c49b32ca
libsyntax: Remove @const
from the language
2013-03-21 17:31:35 -07:00
Patrick Walton
d4fee24c7c
librustc: Forbid destructors from being attached to any structs that might contain non-Owned fields. r=nmatsakis
2013-03-21 17:31:34 -07:00
bors
ec8345b18a
auto merge of #5407 : jbclements/rust/add-assert-eq-macro, r=jbclements
...
Adds an assert_eq! macro that asserts that its two arguments are equal. Error messages can therefore be somewhat more informative than a simple assert, because the error message includes "expected" and "given" values.
2013-03-21 15:24:54 -07:00
Marvin Löbel
0a47cd5ef1
Un-renamed trim and substr functions.
2013-03-21 23:06:05 +01:00
Marvin Löbel
ee2f3d9673
Switched over substr and trim functions in str to be non-allocating, temporary renamed them to better track use-sites
2013-03-21 23:06:04 +01:00
Marvin Löbel
9d9a209e9a
back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> slice_unique
2013-03-21 14:05:57 +01:00
Marvin Löbel
a7d296f24c
renamed str::view -> slice_DBG_BRWD
...
renamed str::slice -> slice_DBG_UNIQ
changed vec slice method -> to_owned()
renamed vec view method -> slice_V_DBG_BRWD
2013-03-21 01:50:32 +01:00
John Clements
3cd65c233d
change some uses of fail_unless to assert_eq
2013-03-20 16:05:59 -07:00
Patrick Walton
9c4d804cfe
libsyntax: Never use ::<>
in the type grammar
2013-03-20 13:54:25 -07:00
bors
db4dc1ffe2
auto merge of #5443 : alexcrichton/rust/less-bad-copy, r=catamorphism
...
Removes a lot of instances of `/*bad*/ copy` throughout libsyntax/librustc. On the plus side, this shaves about 2s off of the runtime when compiling `librustc` with optimizations.
Ideally I would have run a profiler to figure out which copies are the most critical to remove, but in reality there was a liberal amount of `git grep`s along with some spot checking and removing the easy ones.
2013-03-20 00:09:47 -07:00
bors
f3c879fdd8
auto merge of #5442 : pcwalton/rust/extern-block-restriction, r=pcwalton
...
r? @graydon
2013-03-19 21:57:49 -07:00
Alex Crichton
cd7f3ad22e
syntax: Removing some bad copies
2013-03-20 00:33:15 -04:00
Patrick Walton
e6f53c091e
libsyntax: Forbid use
(and most other things) within extern { ... }
blocks
2013-03-19 18:00:18 -07:00
Patrick Walton
b0bea10898
libsyntax: Accept the new [T, ..N]
style for vec.
2013-03-19 15:40:04 -07:00
Patrick Walton
049e1f9a1f
libsyntax: Accept static
instead of const
for globals
2013-03-19 14:46:27 -07:00
bors
e1888948c6
auto merge of #5426 : nikomatsakis/rust/issue-4846-lifetimes-in-expl-self, r=pcwalton
...
(this will be needed for snapshotting at some point)
r? @pcwalton
2013-03-19 12:43:14 -07:00
bors
58209910bd
auto merge of #5433 : lucab/rust/lucab/cfgspec, r=graydon
...
All current meta items types (word, name-value, list) are now
properly parsed by rustc --cfg command line. Fixes #2399
2013-03-19 10:43:24 -07:00
Luca Bruno
0a34a3f0f5
Make driver::driver::parse_cfgspecs parse any variety of meta_item
...
All current meta items types (word, name-value, list) are now
properly parsed by rustc --cfg command line. Fixes #2399
Signed-off-by: Luca Bruno <lucab@debian.org>
2013-03-19 14:02:59 +01:00
Luqman Aden
42f95d055c
Allow constant expressions in [Type * n].
2013-03-18 17:31:41 -07:00
Patrick Walton
e78f2e2ac5
librustc: Make the compiler ignore purity.
...
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.
There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Patrick Walton
c4db4faefa
libsyntax: Stop parsing old lifetimes, except for the ones on data type declarations.
2013-03-18 17:21:15 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Niko Matsakis
a6187c62e9
Make &self permit explicit lifetimes, but don't really use them
...
(this will be needed for snapshotting at some point).
2013-03-18 15:03:37 -04:00
John Clements
4bd26481c4
Update test case to conform to new restrictions on casting
2013-03-15 09:17:49 -07:00
John Clements
b5ace4df45
Test case fixup (old one tested the old bad behavior).
2013-03-15 08:44:21 -07:00
Patrick Walton
50d99e0194
libsyntax: Remove a use of deprecated Encodable from libsyntax. rs=burningtree
2013-03-13 21:54:51 -07:00