Commit Graph

539 Commits

Author SHA1 Message Date
Brian Anderson
7fb1a4e2d1 Camel case core::intrinsic 2012-09-02 15:19:52 -07:00
Brian Anderson
80c4f74c29 Remove the 'to' keyword 2012-09-01 18:38:18 -07:00
Tim Chevalier
4128cc4cb4 Make utility funs in core::int, core::uint, etc. not by-reference
Closes #3302
2012-08-31 16:21:47 -07:00
Patrick Walton
340a219290 libsyntax: Get "extern mod foo;" working in .rc files 2012-08-31 11:46:04 -07:00
Patrick Walton
6e7d5e1cbd rustc: Implement "use mod" 2012-08-31 11:20:50 -07:00
Graydon Hoare
28b1473f84 Fix anon-extern-mod pretty print test. 2012-08-31 10:30:32 -07:00
Patrick Walton
4846affedb rustc: "extern mod { ... }" should be written "extern { ... }" instead 2012-08-30 17:10:07 -07:00
Brian Anderson
65b05a6ce8 Bump version to 0.4 2012-08-30 14:05:59 -07:00
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
Tim Chevalier
cb8ecd7984 Allow extern mods to be anonymous
extern mod {
  f();
}

is now allowed, and puts f in the enclosing scope. (Requires a
link_name attribute to be really useful...)
2012-08-29 12:22:05 -07:00
Ben Striegel
a605fd0cad CamelCasify lots of std 2012-08-28 18:52:44 -07:00
Brian Anderson
cfbc7cbdc7 Convert core::pipes to camel case 2012-08-28 14:33:18 -07:00
Brian Anderson
161a82e433 Camel case various core constructors 2012-08-27 17:22:18 -07:00
Brian Anderson
0c6e470a25 Convert core::result to camel case 2012-08-27 14:37:04 -07:00
Erick Tryzelaar
65bd46c8a5 rustc: more pattern cleanup 2012-08-27 14:10:54 -07:00
Brian Anderson
8337fa1a54 Camel case the option type 2012-08-26 15:56:16 -07:00
Patrick Walton
d77acf7d07 libsyntax: Accept ',' to separate struct fields. Closes #3263. 2012-08-25 16:06:35 -07:00
Patrick Walton
8ef4551904 rustc: Implement foreign constants.
This is needed for a lot of Apple libraries, as Apple tends to put a lot of
globals in dynamic libraries.
2012-08-25 15:09:33 -07:00
Tim Chevalier
5e22fb9c7f Remove match check 2012-08-24 22:28:12 -07:00
Paul Stansifer
18180fd5da "earley_parser" -> "macro_parser" Let's be less confusing. 2012-08-24 18:20:17 -07:00
Paul Stansifer
e54acbf848 Document the macro parser a little more. 2012-08-24 18:20:17 -07:00
Graydon Hoare
c284b8b1dc Start using core::path2::Path in a lot of places. 2012-08-24 15:51:16 -07:00
Niko Matsakis
a8f1bee457 fix some unused pattern binding warnings 2012-08-24 15:37:21 -07:00
Niko Matsakis
e47d2f6060 extend liveness to treat bindings more like other variables
This results in a lot of warnings in rustc.  I left them in because
many are bugs and we should fix our code, but Graydon asked that
I not touch every file in the codebase.
2012-08-24 12:55:08 -07:00
Paul Stansifer
aa024acae3 Use a faked-up function as a key, because functions aren't identical cross-crate in Windows. 2012-08-24 12:20:06 -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
Niko Matsakis
a08f3a7d4d More complete fix to #3162 (borrowck bug related to access to rec fields) 2012-08-23 18:54:08 -07:00
Tim Chevalier
80d129aa45 Parenthesize unary move exprs in prettyprinter
Closes #3220
2012-08-23 16:59:05 -07:00
Paul Stansifer
129c4b694b Give a special error message when [de]serializing fails because the interner isn't in TLS yet. 2012-08-23 11:47:35 -07:00
Paul Stansifer
89bbaff84f m1!{...} is now forbidden. Use m1!(...) instead. 2012-08-23 11:14:15 -07:00
Paul Stansifer
11b640d990 Pretty-print macros with () instead of {}. 2012-08-23 11:14:15 -07:00
Paul Stansifer
77e83d83a9 Change calls of proto! to use parens. 2012-08-23 11:14:15 -07:00
Paul Stansifer
c74a442e86 Eliminate some extraneous curly brackets inside invocations of macro_rules!. 2012-08-23 11:14:14 -07:00
Paul Stansifer
29f32b4a72 m1!{...} -> m1!(...) 2012-08-23 11:14:14 -07:00
Niko Matsakis
511e7626ae Infer variance of types with respect to the region parameter.
A similar approach could be used for type parameters.

Fixes #2282.
2012-08-23 06:30:43 -07:00
Ben Blum
5b25fc918a Parse and typecheck moving out of enums (#2329) 2012-08-22 20:40:25 -04:00
Tim Chevalier
1b804ce343 Merge find_linkage_attrs with find_linkage_metas
This gets rid of a gratuitous `match check`.
2012-08-22 16:43:23 -07:00
Tim Chevalier
0a5f88a240 Change the log level to be an enum rather than an int
This allows for eliminating a match check.
2012-08-22 16:14:39 -07:00
Paul Stansifer
1153b5dcc8 intern identifiers 2012-08-22 14:59:25 -07:00
Paul Stansifer
7317bf8792 pre-intern some fixed names so they can be used as constants 2012-08-22 14:59:24 -07:00
Paul Stansifer
9a7890d73a Centralize ident interner generation. 2012-08-22 14:59:24 -07:00
Tim Chevalier
7284969292 Eliminate many match checks in rustc 2012-08-22 12:25:08 -07:00
Niko Matsakis
652b312122 more sound treatment of fn& regions; change all & to be distinct 2012-08-21 10:28:34 -07:00
Michael Sullivan
457e78cd53 Make by-val explicit self actually work. Closes #2585. 2012-08-17 17:14:32 -07:00
Michael Sullivan
2b457c2654 Pretty print explicit self types. Work on #2585. 2012-08-17 17:14:32 -07:00
Michael Sullivan
a65366d548 Parse explicit self in more places. Work on #2585. 2012-08-17 17:14:32 -07:00
Niko Matsakis
ea549e7a71 make borrowck more conservative around rvalues.
this will require more temporaries, but is probably less magical.
also, it means that borrowck matches trans better, so fewer crashes.
bonus.

Finally, stop warning about implicit copies when we are actually borrowing.

Also, one test (vec-res-add) stopped failing due to #2587, and hence I
added an xfail-test.

Fixes #3217, #2977, #3067
2012-08-17 15:14:13 -07:00
Lindsey Kuper
eb834fdb81 Stop parsing iface. 2012-08-17 14:32:34 -07:00
Eric Holk
7bae3449ce Move select macro into another file, so it can be including in multiple tests.
Fixing long lines.
2012-08-17 12:39:51 -07:00
Eric Holk
9260b02daa Track spans better in the protocol compiler so we can get better error messages. 2012-08-17 12:39:51 -07:00
Brian Anderson
3ab4b014cf Remove the class keyword 2012-08-17 10:13:45 -07:00
Patrick Walton
b592d57311 libsyntax: Make include_bin! generate fixed-length vectors.
This is so that we don't generate 170,000-line LLVM functions in Servo.
2012-08-16 17:20:08 -07:00
Patrick Walton
2489baf82e libsyntax: Fix parsing of "loop unsafe".
It was getting misparsed as a label.
2012-08-16 15:19:47 -07:00
Patrick Walton
0d7bef4d48 libsyntax: Fix wrong pretty printing of private fields 2012-08-15 17:48:47 -07:00
Brian Anderson
af43613795 Long lines 2012-08-15 17:32:19 -07:00
Patrick Walton
a78030fbaa libsyntax: Parse tuple and unit structs 2012-08-15 17:11:13 -07:00
Brian Anderson
913f7bdae7 Modify pipec to not emit calls to some and none 2012-08-15 16:53:41 -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
353c632c2d libsyntax: Parse nested enums 2012-08-15 16:20:34 -07:00
Patrick Walton
bdb206f285 rustc: Parse labeled loop, break, and again 2012-08-15 16:20:34 -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
Brian Anderson
fd0f616ceb pipes: Rename the pipec-generated buffer to __Buffer
Conforms to camel case convention and hides it away so it doesn't conflict
with user code
2012-08-15 15:09:39 -07:00
Brian Anderson
74c69e1053 Convert more core types to camel case 2012-08-15 14:14:20 -07:00
Eric Holk
1e96099918 Add trace_macros! 2012-08-15 11:45:32 -07:00
Tim Chevalier
6d68658b9a Make autoserialize not generate alt checks 2012-08-14 22:13:25 -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
Patrick Walton
138dc3048a libsyntax: Parse "extern mod foo;" 2012-08-14 14:24:00 -07:00
Brian Anderson
350668579a Merge pull request #3194 from dbp/pretty
Pretty printing brackets on match arms
2012-08-14 13:32:29 -07:00
Graydon Hoare
1d3b5478fa Silence unused-variable warning. 2012-08-14 12:15:00 -07:00
Patrick Walton
30e243a5aa libsyntax: Give a nice error message when view items are used anywhere other than the top of a module.
This is a step on the way to parsing "extern mod foo;"
2012-08-14 11:23:25 -07:00
Patrick Walton
81e6bb1b4b libsyntax: First steps toward parsing "extern mod std;" 2012-08-14 11:08:15 -07:00
Daniel Patterson
62a9e16cb2 syntax: fixing pretty printing of brackets in match arms 2012-08-14 09:40:56 -04:00
Graydon Hoare
8271b3f0c8 More attempts at fixing .. breakage. 2012-08-14 05:17:38 +00:00
Patrick Walton
80b6850e34 libsyntax: Implement [int*3] syntax for fixed length vector types 2012-08-13 20:00:03 -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
Patrick Walton
799bc0a193 libsyntax: Allow "use" to be used in place of "import" 2012-08-13 17:55:54 -07:00
Patrick Walton
55ee06b8ce libsyntax: Accept "1..3" as the preferred form of "1 to 3" in patterns 2012-08-13 17:37:08 -07:00
Patrick Walton
9b5266d745 libsyntax: Refactor item parsing so that items and view items are parsed in the same function.
This is a step on the way to "extern mod foo;" and replacing "import" with "use".
2012-08-13 17:12:35 -07:00
Eric Holk
4ec1dd9914 Got the select macro working. 2012-08-13 16:20:23 -07:00
Patrick Walton
87f4c15311 rustc: Make functional record and struct update use ".." instead of "with".
"with" is still accepted for backwards compatibility.
2012-08-13 16:07:12 -07:00
Michael Sullivan
5fd891f10b Fix method mode parsing bug. Closes #3191. 2012-08-13 12:30:07 -05:00
Daniel Patterson
f9946f37aa syntax: better formatting of closures in pretty printer and more verbose debugging messages 2012-08-11 13:04:50 -07:00
Eric Holk
b354fe2a91 report local ambiguity errors earlier 2012-08-10 12:23:16 -07:00
Patrick Walton
5c9c9a6a9f libsyntax: Parse common enum fields 2012-08-08 19:51:48 -07:00
Brian Anderson
99a571585c syntax: Pretty print impls with new syntax 2012-08-08 18:19:26 -07:00
Brian Anderson
436a90e3d7 syntax: Stop supporting old impl syntax 2012-08-08 18:19:26 -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
Niko Matsakis
52c517383e improve borrowck error messages to explain regions better 2012-08-07 20:59:06 -07:00
Patrick Walton
5ce3281a62 rustc: Parse variant structs; add a trivial test case 2012-08-07 18:55:19 -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
0f711e72f7 libsyntax: Break struct definitions out of classes internally in a few more places 2012-08-07 16:09:08 -07:00
Patrick Walton
a3f9e18b7a libsyntax: Allow users of the visitor to visit struct defs 2012-08-07 15:55:33 -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
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
bc267c696c syntax: Rename expr_alt to expr_match 2012-08-07 13:35:51 -07:00
Brian Anderson
92ef17aaeb syntax: Fix parsing of inherent traits 2012-08-07 13:01:22 -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
Eric Holk
abf4421e7c Generate try_send versions for all the messages. Fixes #3128 2012-08-07 11:47:12 -07:00
Patrick Walton
60f47eabe2 rustc: Parse and stub (broken) typechecking for bounded function types 2012-08-06 18:55:24 -07:00
Paul Stansifer
c0f7ed68e2 Fix log_syntax of unexpanded code. 2012-08-06 18:27:37 -07:00
Tim Chevalier
a4cedd9598 Disallow multiple constructors or destructors in the same class
Closes #2825
2012-08-06 18:01:26 -07:00
Patrick Walton
253dfc3387 rustc: Implement pattern matching for structs 2012-08-06 17:36:24 -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
Eric Holk
517ad983f9 Handle interpolated paths in pattern parsing. Fixes #3007.
We might need to use is_ident_or_path in a for other places too.
2012-08-06 13:25:34 -07:00
Patrick Walton
bff512a90f rustc: Implement functional record update for structs 2012-08-06 13:17:42 -07:00
Brian Anderson
d8e9724fb1 syntax: Stop parsing alts without arrows 2012-08-05 22:10:34 -07:00
Brian Anderson
025d86624d Switch alts to use arrows 2012-08-05 22:08:09 -07:00
Patrick Walton
f23674394f rustc: Merge fn& and fn in favor of fn&.
This is a step on the way to moving the function "proto" sigil out front.
2012-08-03 19:49:12 -07:00
Patrick Walton
e02b1b1ec8 rustc: Parse and typecheck repeating vector expressions; e.g. [ 0, ..512 ] 2012-08-03 18:03:19 -07:00
Patrick Walton
e0ee2447bf libsyntax: Fix trailing whitespace 2012-08-03 15:24:34 -07:00
Patrick Walton
b65dd9d090 rustc: Parse, serialize, and deserialize trait inheritance 2012-08-03 15:02:53 -07:00
Patrick Walton
a805a1fb37 rustc: Add the notion of inherited visibility 2012-08-03 15:02:53 -07:00
Patrick Walton
dfe1f6260e rustc: Remove all fixed-length strings from our codebase 2012-08-03 11:22:35 -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
19570ab1f0 Revert "Remove "iface" from keyword table."
This reverts commit 51b9674ed7.
2012-08-02 18:42:09 -07:00
Lindsey Kuper
51b9674ed7 Remove "iface" from keyword table. 2012-08-02 18:10:07 -07:00
Graydon Hoare
009352101d Shift writer_util to a derived impl attached to the writer trait 2012-08-02 18:06:33 -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
Paul Stansifer
7d4742e101 Allow macro_rules! m { (...) => ... } 2012-08-02 11:58:16 -07:00
Paul Stansifer
7129883b51 Allow interpolations of all the nt_*s. 2012-08-02 11:58:16 -07:00
Brian Anderson
2d8c7fd096 syntax: Remove 'ret' 2012-08-01 19:16:09 -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
fd536d9d3e libsyntax: Use the keyword "copy" for copy-mode bindings instead of the +.
Mea culpa for introducing + in the first place.
2012-08-01 16:04:56 -07:00
Graydon Hoare
7f60c56c3e Clean out transitional lint. 2012-08-01 13:35:40 -07:00
Eric Holk
e7a69fbe4e Working on documentation of pipes. 2012-08-01 12:30:07 -07:00
Patrick Walton
899400cd1a libsyntax: Fix a parsing problem with the temporary syntax for by-value pattern match bindings 2012-08-01 12:28:47 -07:00
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
Eric Holk
d74fb9875b Refactoring pipes to allow implementing bounded protocols. 2012-07-25 12:12:25 -07:00
Patrick Walton
728d16cfca rustc: Parse new-style impl declarations 2012-07-24 16:38:24 -07:00
Patrick Walton
587b0edbbf rustc: Don't require that structs have constructors 2012-07-24 15:29:51 -07:00
Paul Stansifer
9103e43909 Bugfix: enable transcription to deal with zero-repetition cases. 2012-07-24 11:44:58 -07:00
Paul Stansifer
e20c5e7596 Improve an error message a little. 2012-07-24 11:44:58 -07:00
Paul Stansifer
f785cccf0f Bugfix: make the parser handle the case where zero repetitions occur, by handling parse results on the basis of what names the matcher expects to bind, not on what names are actually bound. 2012-07-24 11:44:58 -07:00
Patrick Walton
0d581bdafe syntax: Expect the closing brace after struct literals 2012-07-23 18:58:56 -07:00
Patrick Walton
df4db83ed8 rustc: Max/min classes: Add struct literal syntax 2012-07-23 16:40:05 -07:00
Patrick Walton
a57087e032 syntax: Remove reference to typestate in a comment 2012-07-23 13:24:58 -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