Patrick Walton
b414db041b
rustc: Parse by-reference pattern bindings with the "ref" keyword
2012-07-31 19:26:25 -07:00
Patrick Walton
c88933d714
rustc: Implement unary move. Closes #917 .
2012-07-31 17:33:20 -07:00
Brian Anderson
7b2026bf21
Introduce 'return', 'match' and 'module' as synonyms
2012-07-31 17:22:30 -07:00
Brian Anderson
7d18369804
syntax: Rename 'module' extension to 'module_path'
2012-07-31 17:22:30 -07:00
Patrick Walton
2cfe8fb357
rustc: Check self types in method lookup; allow required trait methods to have self types; write self types into metadata
2012-07-31 16:35:11 -07:00
Brian Anderson
567f881fdf
syntax: More tweaks to make alt arrows parse and print correctly
2012-07-31 15:41:26 -07:00
Niko Matsakis
c206d024eb
accept naked exprs with commas in pattern arms
...
pretty printing will use them, but indentation is slightly off
if the expr is long
2012-07-31 15:41:26 -07:00
Paul Stansifer
0bd6371155
Now you can use whatever delimiter you want to invoke syntax extensions.
2012-07-31 14:07:59 -07:00
Lindsey Kuper
439afaa329
Change remaining "iface" occurrences to "trait"; deprecate "iface"
2012-07-31 11:52:16 -07:00
Paul Stansifer
c2f49c46ae
Avoid accidentally printing floating point numbers as 10.f
.
2012-07-31 11:49:20 -07:00
Paul Stansifer
fd52df1901
Fix pretty-printer breakage: 1000f
-> 1000
.
2012-07-31 11:03:22 -07:00
Ben Blum
18851e4248
Build fix: debug![ to debug!{
2012-07-31 13:25:18 -04:00
Patrick Walton
51a06c15da
libsyntax: Parse self types in methods
2012-07-30 19:37:20 -07:00
Graydon Hoare
290f079474
Frontend bits for #2317 , general const-expr classification.
2012-07-30 19:06:06 -07:00
Paul Stansifer
e6af5eeaa2
Fix pretty-printing of consecutive idents.
2012-07-30 18:38:15 -07:00
Paul Stansifer
3819b6b3d1
Allow single quote to be escaped in strings.
2012-07-30 18:38:15 -07:00
Paul Stansifer
a9cc5066ee
Change syntax extension syntax: #m[...]
-> m!{...}
.
2012-07-30 18:38:15 -07:00
Paul Stansifer
650fb06d68
Pretty-print token trees.
2012-07-30 18:04:19 -07:00
Paul Stansifer
a28812cfd6
Improve some documentation.
2012-07-30 18:04:19 -07:00
Paul Stansifer
19922fcd93
Feed the interner to the pretty-printer, in anticipation of pretty-printing token trees.
2012-07-30 18:04:19 -07:00
Paul Stansifer
4e9c475527
Work around bug #2935 by unautounboxing.
2012-07-30 18:04:19 -07:00
Paul Stansifer
be3b733c49
Let's give that binder a name that's not incredibly confusing.
2012-07-30 18:04:19 -07:00
Paul Stansifer
e040ab8423
Impl-ize interner.
2012-07-30 18:04:19 -07:00
Paul Stansifer
a7125971c6
Rename #mod
-> #module
to not collide with the keyword.
2012-07-30 18:04:18 -07:00
Brian Anderson
ef29f7ff36
syntax: Fix semicolon printing. Closes #3036
2012-07-30 16:09:52 -07:00
Tim Chevalier
082d8314da
Rewrite bitv to use classes and optimize its representation
...
Rewrote bitv as a class that uses a 32-bit int as its representation
for bit vectors of 32 bits or less, and a vector (the old representation)
otherwise. I didn't benchmark very much, but a bit of informal benchmarking
suggested this is a win.
Closes #2341
2012-07-29 18:39:15 -07:00
Patrick Walton
93c2f5e0e4
rustc: Use coherence for operator overloading.
...
The only use of the old-style impls is now placement new.
2012-07-27 19:35:24 -07:00
Graydon Hoare
e6d2e49852
Kill off another couple uses of the term 'mtcs'.
2012-07-27 19:19:40 -07:00
Graydon Hoare
517af7e743
early => earley. Oops.
2012-07-27 19:18:16 -07:00
Graydon Hoare
e11e90f31c
Make macro-system type and constructor names more uniform; more comments.
2012-07-27 19:14:46 -07:00
Graydon Hoare
eabd233dcd
Start killing off obsolete/unused quoters, and fix long lines.
2012-07-27 18:06:24 -07:00
Graydon Hoare
1d9f01cb42
Comments in the new macro system, reflecting conversation with pauls.
2012-07-27 17:42:42 -07:00
Tim Chevalier
a0d05844ed
Correctly forbid upvars in nested impls, traits and classes
...
Previously, resolve was allowing impls, traits or classes that were
nested within a fn to refer to upvars, as well as referring to type
parameters bound by the fn. Fixing this required adding a new kind of
def: def_typaram_binder, which can refer to any of an impl, trait or
class that has bound ty params. resolve uses this to enforce that
methods can refer to their parent item's type parameters, but not to
outer items' type parameters; other stages ignore it. I also made
sure that impl, trait and class methods get checked inside a
MethodRibKind thing so as to forbid upvars, and changed the definition
of MethodRibKind so that its second argument is an optional node_id
(so that required trait method signatures can be checked with a
MethodRibKind as well).
2012-07-27 17:31:42 -07:00
Graydon Hoare
dbbaa50290
Nomenclature fixes in the lint checker. Fewer double-negatives.
...
New style is allow(foo), warn(foo), deny(foo) and forbid(foo),
mirrored by -A foo, -W foo, -D foo and -F foo on command line.
These replace -W no-foo, -W foo, -W err-foo, respectively.
Forbid is new, and means "deny, and you can't override it".
2012-07-26 17:08:33 -07:00
Damian Gryski
ffb067640b
diagnostic: only print color if output is for the screen
2012-07-26 17:05:13 -07:00
Paul Stansifer
97422f0f0f
Merge branch 'incoming' of github.com:mozilla/rust
2012-07-26 16:16:28 -07:00
Patrick Walton
afd9a75c9e
rustc: Fix cross-crate max/min-class-style constructors
2012-07-26 15:30:15 -07:00
Eric Holk
5805616aad
Make parsing about 0.3 seconds faster.
2012-07-26 11:37:57 -07:00
Eric Holk
0a8b794a3a
Add #[inline(never)], and also fixed inlining on vec::push
2012-07-26 11:37:57 -07:00
Eric Holk
fec749df16
Comments Only: Remove outdated FIXMEs. Fixes #2886 .
2012-07-26 10:20:05 -07:00
Paul Stansifer
f4c093c4af
Change #macro
to macro_rules!
in some cases.
2012-07-26 10:14:01 -07:00
Paul Stansifer
7f5fbd4f9d
Allow old-style syntax extensions to be called with new syntax.
2012-07-26 09:52:21 -07:00
Eric Holk
ab1defb1ce
Make parsing about 0.3 seconds faster.
2012-07-26 09:47:32 -07:00
Eric Holk
3aee39a6ec
Add #[inline(never)], and also fixed inlining on vec::push
2012-07-25 17:30:13 -07:00
Eric Holk
6748f78cb1
Polymorphic protocols work well enough to do MapReduce.
...
I did some horrible things with type variable naming here. It should do the right thing in most cases, but we'll need to go through and make it correct someday.
2012-07-25 12:12:26 -07:00
Eric Holk
14adb98b64
Bounded protocols work well enough to compile core, but map reduce has too many type parameters, so we have to get fancier.
2012-07-25 12:12:25 -07:00
Eric Holk
1dde5e7fc2
Thread spans through the pipe compiler. They aren't perfect, but they make debugging far easier than core.rc:0:0.
...
Changed the is_bounded check, so we fail compiling core right now due to not supporting type parameters.
2012-07-25 12:12:25 -07:00
Eric Holk
7f5f1f90a0
Compiled a bounded version of pingpong.
...
There are some failures in the other pipe tests, but these seem to just be a matter of generalizing the library code.
Updating pipes library so all tests pass again
2012-07-25 12:12:25 -07:00
Eric Holk
b97fe98354
Generate buffer type for bounded protocols
2012-07-25 12:12:25 -07:00
Eric Holk
c28af26258
Refactor the bounded pingpong example to avoid needing to generate unsafe code.
...
Took some steps towards bounded codegen.
2012-07-25 12:12:25 -07:00