Paul Stansifer
e7f07cb2a3
Update tests to respect the way that macros work now.
2012-11-29 12:09:11 -08:00
Paul Stansifer
45bcb10204
Forbid item macros from occuring where statement macros might occur, and allow item macros to look like statement/expr macros.
2012-11-29 12:09:10 -08:00
Paul Stansifer
0f707f42c8
Distinguish stmt_mac
s that are followed by semicolons and those that aren't.
2012-11-29 12:09:10 -08:00
Paul Stansifer
e77491bd87
Make the parser handle stmt macros that might be exprs at the end of blocks.
2012-11-29 12:09:10 -08:00
Paul Stansifer
bd92499c5e
Allow parsing of macros in statement position.
2012-11-29 12:09:10 -08:00
Paul Stansifer
9814e58815
No longer parse the delimiters of the RHS of a macro as part of the expansion.
2012-11-29 12:09:10 -08:00
Paul Stansifer
ba354b1726
Allow the expansion of old-style expr macros in stmt position.
2012-11-29 12:09:10 -08:00
Paul Stansifer
b7fcc9b52e
Use biased_match!
to avoid over-deep indentation in expand.rs.
2012-11-29 12:09:10 -08:00
Paul Stansifer
cf26a7d7b9
Make it possible to expand stmt macros.
2012-11-29 12:09:10 -08:00
Paul Stansifer
ee076f63f9
Allow for macros to occur in statement position.
2012-11-29 12:09:10 -08:00
Paul Stansifer
fca52554e7
Make it possible to invoke item macros without passing identifier arguments.
2012-11-29 12:09:10 -08:00
Paul Stansifer
cafea5ecb6
Grammaticalinate an error message.
2012-11-29 12:09:10 -08:00
Paul Stansifer
9845a4be5a
Allow macro_rules!
macros to expand to expressions or items.
2012-11-29 12:09:10 -08:00
Patrick Walton
c946c87b6f
libsyntax: Remove the "by-mutable-ref" obsolete syntax error; it blocks useful function argument patterns. Add a test for the latter. r=brson
2012-11-29 12:06:36 -08:00
Patrick Walton
3beff12309
test: Fix broken resource-cycle.rs. r=tinderbox
2012-11-29 12:05:56 -08:00
Patrick Walton
9678abedec
test: Add a test that function argument patterns take in the expected type. r=test-only
2012-11-29 11:25:02 -08:00
Patrick Walton
976e1ced00
test: Add a test for generic objects. r=test-only
2012-11-29 11:18:36 -08:00
Patrick Walton
9e1c9be16f
librustc: Make the Drop trait use explicit self
2012-11-29 11:06:15 -08:00
Brian Anderson
5a282ec26f
core: Convert some records to structs
2012-11-28 21:50:09 -08:00
Brian Anderson
4a2a375fbf
rustdoc: More pipe conversion
2012-11-28 20:51:18 -08:00
Brian Anderson
65bd40e300
Remove uses of #[merge]
2012-11-28 17:09:26 -08:00
Brian Anderson
9b95d51131
core: Remove old template files
2012-11-28 15:26:55 -08:00
Brian Anderson
16f72df704
Merge remote-tracking branch 'erickt/time'
...
Conflicts:
src/libstd/time.rs
2012-11-28 14:49:58 -08:00
Brian Anderson
42c2c2ab2f
Remove parser hack
2012-11-28 14:39:48 -08:00
Patrick Walton
b9f9ab8f77
test: Implement a test for the Drop trait on a generic struct. a=test-only
2012-11-28 14:19:41 -08:00
Brian Anderson
fc06114ddf
Merge remote-tracking branch 'brson/companion' into incoming
...
Conflicts:
src/compiletest/compiletest.rs
src/libcargo/cargo.rs
src/libcore/core.rs
src/librustc/rustc.rs
src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef
Register snapshots
2012-11-28 12:33:00 -08:00
Patrick Walton
669fbddc44
librustc: Add explicit self to IterBytes. r=nmatsakis
2012-11-28 11:36:04 -08:00
Patrick Walton
430583c8b4
librustc: Allow &T to be assigned to *T. r=nmatsakis
2012-11-28 11:29:53 -08:00
Patrick Walton
07f4031bb4
libsyntax: Implement a macro die!
to replace the fail
expression. r=brson
2012-11-28 11:28:56 -08:00
Patrick Walton
61cfec3c52
librustc: Parse extern "C" { ... }
. r=brson
2012-11-28 11:28:16 -08:00
Michael Arntzenius
d2d6d955f4
libcore/to_bytes.rs: add IterBytes impls for pairs and triples. r=pcwalton
2012-11-28 11:27:05 -08:00
Patrick Walton
ca6970a65e
librustc: Make overloaded operators with explicit self translate correctly
2012-11-28 11:01:14 -08:00
Graydon Hoare
082a88e42c
Merge pull request #4032 from catamorphism/getopts
...
[libstd] getopts, now with fewer copies
2012-11-28 08:47:25 -08:00
Brian Anderson
19f5f91c04
rustdoc: Make fold require Clone instead of Copy
2012-11-27 11:08:19 -08:00
Brian Anderson
b21e9d52de
core: Add Clone trait
2012-11-27 11:08:19 -08:00
Patrick Walton
1c348e6e38
librustc: Implement @mut [T] as the new replacement for @[mut T]
2012-11-27 09:23:31 -08:00
Erick Tryzelaar
32763caa60
auto_serialize should use explicit refs ( fixes #4044 )
2012-11-26 22:31:48 -08:00
Erick Tryzelaar
cd6300e938
libstd: turn time::Tm and time::Timespec into structs
...
This avoids #4044 by not using the enum wrapper, and turning Tm_
directly into a struct. Along the way it modernizes the codebase
to eliminate no-implicit-copies warnings.
2012-11-26 22:22:22 -08:00
Jesse Jones
a18f0d413c
Made Tm_ a struct instead of a record and added serialization support to Tm and Tm_.
...
Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.
2012-11-26 21:49:29 -08:00
Patrick Walton
7bc29c62d0
libcore: Add explicit self to all overloaded operators but Add and Index. r=brson
2012-11-26 19:35:52 -08:00
Brian Anderson
be6613e048
Remove the crate language
2012-11-26 18:13:54 -08:00
Brian Anderson
81a79603c0
Add a temporary hack to divert the parser to an alternate file
2012-11-26 18:13:54 -08:00
Brian Anderson
58e26243a7
syntax: Add a hack to support the int-template pattern
2012-11-26 18:13:54 -08:00
Patrick Walton
de0268b693
librustc: Fix translation of cross-crate inline or generic methods with explicit self. rs=blocking-snapshot
2012-11-26 18:09:12 -08:00
Brian Anderson
917ee7e5b1
Ignore two failure tests on windows
2012-11-26 14:48:48 -08:00
Damien Grassart
9f290b5669
Fix sample code in the tutorial
2012-11-26 14:41:29 -08:00
Gareth Daniel Smith
689f6ce5d0
Add insert and remove methods to vecs - as proposed in issue #4028 .
2012-11-26 14:34:50 -08:00
Brian Anderson
aee0b767bc
Add a FIXME about the problems closing /dev/urandom
2012-11-26 12:54:29 -08:00
Jesse Jones
065d642b15
Log errors from close instead of ignoring them.
...
They shouldn't matter but there have been errors on Macs so logging
them may help root cause the issue.
2012-11-26 12:54:29 -08:00