Patrick Walton
a1c11cab2d
rustc: Make <=
, >=
, and >
use traits as well
2012-08-29 19:23:15 -07:00
Patrick Walton
96534365c2
rustc: Make <
and =
into traits
2012-08-29 18:25:22 -07:00
Brian Anderson
c0c8d3aa8f
core: Demode int/uint mods
2012-08-29 16:23:36 -07:00
Brian Anderson
8337fa1a54
Camel case the option type
2012-08-26 15:56:16 -07:00
Niko Matsakis
a8f1bee457
fix some unused pattern binding warnings
2012-08-24 15:37:21 -07:00
Michael Sullivan
0f996f70a6
Remove purity from fn_decl and move it out to containing AST elements.
2012-08-23 19:40:01 -07:00
Paul Stansifer
1153b5dcc8
intern identifiers
2012-08-22 14:59:25 -07:00
Niko Matsakis
652b312122
more sound treatment of fn& regions; change all & to be distinct
2012-08-21 10:28:34 -07:00
Patrick Walton
3038968f28
rustc: Perform some AST surgery to separate out class fields from methods
2012-08-15 16:20:35 -07:00
Patrick Walton
bdb206f285
rustc: Parse labeled loop, break, and again
2012-08-15 16:20:34 -07:00
Brian Anderson
6a0720b439
Convert impls to new syntax
2012-08-08 18:19:24 -07:00
Patrick Walton
4f98e80db1
rustc: Do some plumbing work in preparation for common fields in enums
2012-08-08 17:15:37 -07:00
Patrick Walton
438765da59
rustc: Box struct_defs
2012-08-07 17:46:51 -07:00
Michael Sullivan
7f7f47620e
Implement static typeclass methods. Closes #3132 .
2012-08-07 17:18:14 -07:00
Patrick Walton
a3f9e18b7a
libsyntax: Allow users of the visitor to visit struct defs
2012-08-07 15:55:33 -07:00
Brian Anderson
42540841f3
Add missing comma
2012-08-07 14:34:00 -07:00
Patrick Walton
727c7c7499
rustc: Add stub support for struct variants to the AST
2012-08-07 14:25:53 -07:00
Brian Anderson
2772b2e5c7
syntax: Make match arm parsing more restrictive again
...
Require comma separators for all expression types except the plain block
2012-08-07 12:23:43 -07:00
Patrick Walton
253dfc3387
rustc: Implement pattern matching for structs
2012-08-06 17:36:24 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Brian Anderson
025d86624d
Switch alts to use arrows
2012-08-05 22:08:09 -07:00
Niko Matsakis
31c5cec55b
Purge placement new; Make borrowck know about unary move.
...
cc #3071
2012-08-02 22:36:36 -07:00
Lindsey Kuper
65e0e30e59
Make typeck::collect aware of provided methods in traits.
2012-08-02 17:15:36 -07:00
Michael Sullivan
2fe299d1a5
Extend ast_map to know about method declarations in traits.
2012-08-02 16:02:30 -07:00
Niko Matsakis
97452c0ca1
Remove modes from map API and replace with regions.
...
API is (for now) mostly by value, there are options to use it by
reference if you like. Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
2012-08-02 15:53:28 -07:00
Brian Anderson
b355936b4d
Convert ret to return
2012-08-01 19:16:06 -07:00
Brian Anderson
507fba57d1
syntax: Allow any block-like expr to be used as alt arm w/o comma separator
2012-08-01 17:57:03 -07:00
Patrick Walton
b414db041b
rustc: Parse by-reference pattern bindings with the "ref" keyword
2012-07-31 19:26:25 -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
fd52df1901
Fix pretty-printer breakage: 1000f
-> 1000
.
2012-07-31 11:03:22 -07:00
Graydon Hoare
290f079474
Frontend bits for #2317 , general const-expr classification.
2012-07-30 19:06:06 -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
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
Patrick Walton
afd9a75c9e
rustc: Fix cross-crate max/min-class-style constructors
2012-07-26 15:30:15 -07:00
Patrick Walton
978ca03cb2
Revert "accept naked exprs with commas in pattern arms" due to pretty-printing failures
...
This reverts commit f712b2d76b
.
In alt arms, the parser needs to do a little lookahead to determine
whether it's looking at a record literal or a block.
Also there are some indentation issues in the expected source.
2012-07-19 07:53:55 -07:00
Niko Matsakis
f712b2d76b
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-18 20:16:41 -07:00
Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Tim Chevalier
b5729bd600
Support attributes on class ctors and dtors
...
Closes #2660
2012-07-17 12:40:59 -07:00
Niko Matsakis
41a21f053c
remove typestate from code, tests, and docs
2012-07-14 17:37:20 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Michael Sullivan
985b52be6d
Support prefix notation for vstore strings. Closes #2906 .
2012-07-13 17:03:49 -07:00
Lindsey Kuper
fc9c4c3245
Front-end support for default impls in traits.
2012-07-13 11:16:07 -07:00
Tim Chevalier
78ec6fe30c
Obliterate the callee_id hack
...
Exprs that could be applications of overloaded operators
(expr_unary, expr_binary, expr_index) relied on the previous node ID
being "reserved" to carry extra typechecking info. This was
incredibly error-prone. Fixed it; now all exprs have two node IDs
(which will be wasted in some cases; future work could make this
an option instead if the extra int field ends up being a performance
problem).
Closes #2804
2012-07-12 19:02:07 -07:00
Niko Matsakis
b9aa9def85
infer when types are region parameterized rather than requiring /&
...
- removes various fields from various variants in the AST
- also update tests not to use this notation
2012-07-11 14:41:41 -07:00
Gareth Daniel Smith
be0141666d
convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-04 19:18:13 -07:00
Brian Anderson
ae6ea068a1
Revert "Remove rule requiring non-nil block-style statements to be semi-terminated"
...
This reverts commit 0f5eaef5fb
.
2012-07-03 17:30:25 -07:00
Brian Anderson
0f5eaef5fb
Remove rule requiring non-nil block-style statements to be semi-terminated
...
This is a subtle rule that no longer seems to be required.
2012-07-03 17:03:52 -07:00
Patrick Walton
f093d374ed
rustc: Implement a new resolve pass behind a compile flag
2012-07-02 18:30:12 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00