Michael Sullivan
0f996f70a6
Remove purity from fn_decl and move it out to containing AST elements.
2012-08-23 19:40:01 -07:00
Niko Matsakis
a08f3a7d4d
More complete fix to #3162 (borrowck bug related to access to rec fields)
2012-08-23 18:54:08 -07:00
Paul Stansifer
29f32b4a72
m1!{...}
-> m1!(...)
2012-08-23 11:14:14 -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
19b8598c09
rustc: Implement "priv" for simple items.
...
Inherited privacy doesn't work yet. This probably requires a snapshot since
it won't be backwards compatible. Additionally, two errors are printed instead
of one. For this reason the test is XFAIL'd.
2012-08-17 17:56:47 -07:00
Patrick Walton
6b1a9af173
rustc: Remove all the code dealing with named implementations in resolve3
2012-08-17 17:09:53 -07:00
Patrick Walton
26aaf08ff4
rustc: Remove the impl map
2012-08-17 16:53:07 -07:00
Patrick Walton
6f441e8fde
rustc: Remove lookup_defs; unused.
2012-08-17 14:31:39 -07:00
Patrick Walton
578b7266f2
rustc: Encode reexports in the metadata and don't have each_path search tag_paths
2012-08-17 12:42:45 -07:00
Brian Anderson
3ab4b014cf
Remove the class keyword
2012-08-17 10:13:45 -07:00
Patrick Walton
bf0d4cc035
rustc: Allow external structs to be constructed. Closes #3012 .
...
Embarrassing.
2012-08-15 21:03:40 -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
74c69e1053
Convert more core types to camel case
2012-08-15 14:14:20 -07:00
Brian Anderson
395d1ac185
rustc: Enum idents are not in the value namespace. Closes #3186
2012-08-13 15:17:54 -07:00
Brian Anderson
780b3853d1
rustc: Remove some uses of impl_map
2012-08-08 19:27:20 -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
f110e8f21c
rustc: Do some plumbing work on nested enums
2012-08-08 14:19:21 -07:00
Tim Chevalier
c7d60ee053
Don't add struct names to the value name space if there's no constructor
...
Closes #3149
2012-08-08 11:53:08 -07:00
Patrick Walton
31965860c7
rustc: Resolve constructor expressions for variant structs
2012-08-07 19:12:58 -07:00
Michael Sullivan
7f7f47620e
Implement static typeclass methods. Closes #3132 .
2012-08-07 17:18:14 -07:00
Patrick Walton
deaef48675
rustc: Split out struct bodies into a separate "struct_def" type in the AST
2012-08-07 15:35:05 -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
Tim Chevalier
5cb3a94bfb
Shorten lines, fix build breakage
2012-08-06 17:33:23 -07:00
Tim Chevalier
6bd01d0ac8
In resolve, forbid duplicate value, type, and module items
...
Closes #3099
2012-08-06 16:37:18 -07:00
Niko Matsakis
a6a5c48c64
make ref x
bindings produce region ptrs and fix various minor bugs
...
we now detect inconsistent modes, binding names, and various other errors.
typeck/trans integration is mostly done.
borrowck not so much.
more tests needed.
2012-08-06 16:12:40 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Patrick Walton
bff512a90f
rustc: Implement functional record update for structs
2012-08-06 13:17:42 -07:00
Brian Anderson
025d86624d
Switch alts to use arrows
2012-08-05 22:08:09 -07:00
Patrick Walton
b65dd9d090
rustc: Parse, serialize, and deserialize trait inheritance
2012-08-03 15:02:53 -07:00
Niko Matsakis
31c5cec55b
Purge placement new; Make borrowck know about unary move.
...
cc #3071
2012-08-02 22:36:36 -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
Patrick Walton
b414db041b
rustc: Parse by-reference pattern bindings with the "ref" keyword
2012-07-31 19:26:25 -07:00
Brian Anderson
7b2026bf21
Introduce 'return', 'match' and 'module' as synonyms
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
Lindsey Kuper
439afaa329
Change remaining "iface" occurrences to "trait"; deprecate "iface"
2012-07-31 11:52:16 -07:00
Paul Stansifer
a9cc5066ee
Change syntax extension syntax: #m[...]
-> m!{...}
.
2012-07-30 18:38:15 -07:00
Lindsey Kuper
f78776e9d8
rustc: "iface" -> "trait" in comments, error messages, and identifiers.
...
(Also "interface" -> "trait" in error messages.)
2012-07-30 17:26:14 -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
f7382c454f
Forbid duplicate fields in record types and exprs
...
Closes #3033
2012-07-27 17:33:05 -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
Tim Chevalier
b6aadf56c8
In resolve, check for duplicate pattern-bound vars
...
Closes #3038
2012-07-27 13:35:17 -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
Patrick Walton
afd9a75c9e
rustc: Fix cross-crate max/min-class-style constructors
2012-07-26 15:30:15 -07:00
Patrick Walton
587b0edbbf
rustc: Don't require that structs have constructors
2012-07-24 15:29:51 -07:00
Patrick Walton
b3cad86a05
rustc: Resolve struct names in struct literals
2012-07-23 18:58:57 -07:00