Commit Graph

989 Commits

Author SHA1 Message Date
Graydon Hoare
45e7b89279 s/class/struct/ in an error message. 2012-08-16 14:25:53 -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
6319c8fbc4 rustc: Fix long lines and trailing whitespace 2012-08-15 16:25:42 -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
Patrick Walton
d54db12155 rustc: Implement automatic reference for method receivers 2012-08-15 16:20:33 -07:00
Patrick Walton
fe9d07dda6 rustc: "as Trait" can now be written "as @Trait".
There is also code for ~Trait and &Trait, but these are currently (incorrectly)
synonyms for "as @Trait" and "as &Trait".
2012-08-15 16:20:31 -07:00
Tim Chevalier
c0140f5c34 Reject empty matches on inhabited types
Closes #3096
2012-08-15 14:57:45 -07:00
Brian Anderson
a83414b6e8 lint: Allow leading underscores on camel case types 2012-08-15 14:54:33 -07:00
Brian Anderson
74c69e1053 Convert more core types to camel case 2012-08-15 14:14:20 -07:00
Brian Anderson
11258310e2 Convert more core types to camel case 2012-08-14 18:26:03 -07:00
Michael Sullivan
e640a66eb4 Make most forms of explicit self work. By-value not implemented. Work on #2585. 2012-08-14 17:40:04 -07:00
Graydon Hoare
4c16ff516d Convert a couple hundred ~""s to ""s, in trans functions. 2012-08-14 16:45:51 -07:00
Lindsey Kuper
fb05f57881 Compile default methods; un-xfail default methods test (cc: #2794). 2012-08-14 09:02:47 -07:00
Brian Anderson
5394e34aa4 core: Camel case some lesser-used modules 2012-08-13 18:59:48 -07:00
Brian Anderson
6b43c0c1ad Stop parsing old operator overloading syntax 2012-08-13 18:59:17 -07:00
Tim Chevalier
c0858f4f7a In typeck::collect::ensure_trait_methods, don't assume the trait was already checked
Instead of using node_id_to_type to look up the trait type, pass it
in as an argument. This handles the case where we check an impl of a trait T
before T has been traversed.
2012-08-13 17:38:58 -07:00
Graydon Hoare
91612dbb7e De-mode-ify a few minor libcore modules. 2012-08-13 17:11:33 -07:00
Patrick Walton
5bd4110170 rustc: Mostly implement region-bounded stack closures 2012-08-13 15:34:36 -07:00
Brian Anderson
395d1ac185 rustc: Enum idents are not in the value namespace. Closes #3186 2012-08-13 15:17:54 -07:00
Lindsey Kuper
b1ec0a582e Default methods get through compilation, but not linkage (cc: #2794). 2012-08-13 10:34:35 -07:00
Lindsey Kuper
0e0833e0b0 Change "iid" identifiers (apparently "interface id") to "trait_id" 2012-08-13 10:34:35 -07:00
Niko Matsakis
9169a1b26a correct glb computation, improve region error msgs
cc #3180
2012-08-11 20:24:11 -07:00
Niko Matsakis
0475406178 infer: better names, docs 2012-08-11 20:24:11 -07:00
Niko Matsakis
a9979c0ae4 switch over some newtyped enums to structs 2012-08-11 20:24:11 -07:00
Niko Matsakis
6d2bef53aa rename var_bindings to be less cryptic 2012-08-11 20:24:11 -07:00
Patrick Walton
7634e2911b Revert "rustc: Make function types have vstores in them"
This reverts commit 0101125a96.
2012-08-10 18:14:55 -07:00
Patrick Walton
0101125a96 rustc: Make function types have vstores in them 2012-08-10 16:22:06 -07:00
Lindsey Kuper
4597fe1320 Remove unneeded imports now that #1873 seems to be fixed 2012-08-10 13:38:21 -07:00
Lindsey Kuper
0c35489858 Move a comment to where it belongs. 2012-08-10 13:38:21 -07:00
Brian Anderson
96fdad2fb7 Change 'ret' to 'return' in an error message 2012-08-10 12:20:58 -07:00
Patrick Walton
68bdc09650 rustc: Allow @fn to be used as a synonym for fn@, and likewise with ~ and & 2012-08-10 12:18:47 -07:00
Niko Matsakis
2082a979e7 remove modes from ty.rs 2012-08-10 10:52:11 -07:00
Patrick Walton
770a21272b rustc: Initialize the drop flag with the new struct literal syntax. Closes #3172. 2012-08-09 19:45:37 -07:00
Niko Matsakis
1b2d91c79d de-mode-ify infer and some parts of typeck
also, fix bug in the various lint passes that fn() was considered
not suitable for the default mode
2012-08-09 18:26:50 -07:00
Ben Blum
d913492855 Change coherence error 'implement a trait instead' -> 'implement a trait or new type instead' 2012-08-09 20:29:34 -04:00
Graydon Hoare
f0775d7bfe Finish translating const indexing. Close #1417, close #570, close #571, close #1272, close #2317. 2012-08-09 16:05:34 -07:00
Niko Matsakis
22a14dd700 Enforce a stricter notion of purity when borrowing. Fixes #3162. 2012-08-09 14:23:56 -07:00
Lindsey Kuper
e82d2ef763 Minor cleanup 2012-08-09 11:10:09 -07:00
Brian Anderson
7bbdf296e0 lint: Don't warn about non-camel case impl names
Impls are always named __extensions__ so this warning is bogus
2012-08-08 22:21:47 -07:00
Graydon Hoare
a0e3a2ae8e Const field access (working) and vec indexing (almost). More for #2317. 2012-08-08 19:59:30 -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
Lindsey Kuper
edf1d0c245 Minor cleanups/comments/whitespace changes 2012-08-08 16:07:52 -07:00
Lindsey Kuper
293f371477 Default methods in traits get through typeck. 2012-08-08 16:07:52 -07:00
Lindsey Kuper
c8bad36312 Change a match check to match 2012-08-08 16:07:52 -07:00
Lindsey Kuper
8b79bed6dd Clean up whitespace 2012-08-08 16:07:52 -07:00
Tim Chevalier
febd7ee239 Make let _ = e; have the same semantics as e;
The first case was getting treated like a variable binding, meaning that
if e had a destructor, it wouldn't run until the end of the enclosing scope.
To me it seems less confusing for let _ = e; and e; to work exactly the same
way, so now, the destructor for e runs immediately in both cases.
2012-08-08 15:37:45 -07:00
Brian Anderson
d99ca69cf7 lint: Allow trailing underscores in camel case idents 2012-08-08 15:05:49 -07:00