Commit Graph

779 Commits

Author SHA1 Message Date
Brian Anderson
1f3303163c Move filemap ctors to static methods 2012-11-12 16:44:53 -08:00
Brian Anderson
5f881b48cb Remove filemap box typedef from codemap 2012-11-12 16:41:20 -08:00
Brian Anderson
4c68084963 Convert most codemap types from records to structs 2012-11-12 16:21:39 -08:00
Patrick Walton
fe02814a63 rustc: Implement floating point literal inference. r=nmatsakis 2012-11-12 10:39:08 -08:00
Patrick Walton
0fc952372a rustc: Support irrefutable patterns in function arguments. r=nmatsakis 2012-11-07 19:29:30 -08:00
Niko Matsakis
b0ed151539 Cleanup how we handle proto in types, remove unsound subtyping
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`.  They now result in compilation errors.

Fixes #2978.

Necessary first step for #2202, #2263.
2012-11-06 08:56:29 -08:00
Patrick Walton
be93b29d30 rustc: Implement parsing and typechecking for "once fn" 2012-11-05 13:17:02 -08:00
Tim Chevalier
a006608276 Remove stage0 stuff that was awaiting snapshot
and re-register snapshots

Just removing unneeded code, no review
2012-11-03 14:04:32 -07:00
Brian Anderson
762101b72a syntax: Fold macros in default methods. Closes #3911 2012-11-02 23:11:36 -07:00
Tim Chevalier
4876eb708c Fix #1996 (pending snapshot)
Change int to uint in some extfmt code. Remove the #[cfg(stage0)] code
after a snapshot.
2012-11-02 12:01:38 -07:00
Brian Anderson
3edccc311e Support #[cfg] on methods 2012-11-01 15:48:50 -07:00
Tim Chevalier
4e5865f2ad Fix #1458 (allow paren'd exprs to be the operator in a do)
Closes #1458
2012-10-30 15:06:13 -07:00
Tim Chevalier
62f98c8ff8 Preserve parenthesization in the AST
Maintain explicit "paren" nodes in the AST so we can pretty-print
without having to guess where parens should go. We may revisit this
in the future.

r=graydon
2012-10-30 15:05:32 -07:00
Patrick Walton
d5a27a0e0c rustc: Translate monomorphic intra-crate automatically-derived methods that follow the "eq" format 2012-10-26 18:23:45 -07:00
Patrick Walton
c7ec183b34 libsyntax: Fix pretty printing of tuple structs. Attempt to put out fire. rs=rustbot 2012-10-26 12:11:40 -07:00
Patrick Walton
93a0763d53 libsyntax: Don't write a ctor ID for struct-like enum variants. rs=rustbot 2012-10-25 14:20:09 -07:00
Brian Anderson
a9d7642b5d Merge remote-tracking branch '14427/incoming'
Conflicts:
	src/libstd/sort.rs
2012-10-25 14:01:49 -07:00
Patrick Walton
599b4208fb rustc: Translate tuple struct constructors 2012-10-25 11:49:26 -07:00
Brian Anderson
3b6f5a18a2 Merge branch 'method-vis-parse'
Conflicts:
	src/libsyntax/parse/parser.rs
2012-10-24 12:15:21 -07:00
Patrick Walton
4da58a5bd6 rustc: Implement typechecking for tuple structs. r=nmatsakis 2012-10-24 10:54:09 -07:00
Mahmut Bulut
21cbc310c7 Make check & Tidy 2012-10-24 16:51:33 +03:00
Tim Chevalier
087cbb55d0 Remove <- operator from the compiler
Yield an obsolete syntax error on things like "let foo <- bar;"
and "foo <- bar;" r=brson

Progress on #3466
2012-10-23 12:10:19 -07:00
Tim Chevalier
48c8d1fecd Remove uses of binary move in the compiler 2012-10-23 12:10:04 -07:00
Tim Chevalier
46fef3d601 Don't generate move-by-init in AST builder 2012-10-23 12:10:04 -07:00
Patrick Walton
3bf0a9b094 rustc: Implement typechecking for simple monomorphic derivable traits on monomorphic types. r=brson 2012-10-23 10:45:23 -07:00
Mahmut Bulut
2985b8e552 * Parsing sequence changed
1- visibility parse
2- purity parse
2012-10-23 09:42:30 +03:00
Simon BD
cc0f2c6bb2 Merge remote-tracking branch 'original/incoming' into incoming 2012-10-22 18:33:41 -05:00
Tim Chevalier
dd66e7549b Preliminary support for labeled break/continue for loops
This patch adds preliminary middle-end support (liveness and trans)
for breaks and `loop`s to `loop` constructs that have labels.

while and for loops can't have labels yet.

Progress on #2216
2012-10-22 09:20:37 -07:00
Tim Chevalier
46d4bbbae4 Simplify the AST representation of ty param bounds
Change ast::ty_param_bound so that all ty param bounds are represented
as traits, with no special cases for Copy/Send/Owned/Const.
typeck::collect generates the special cases.

A consequence of this is that code using the #[no_core] attribute
can't use the Copy kind/trait. Probably not a big deal?

As a side effect, any user-defined traits that happen to be called
Copy, etc. in the same module override the built-in Copy trait.

r=nmatsakis

Closes #2284
2012-10-22 09:01:12 -07:00
Brian Anderson
f3df50f67f Parse and report obsolete fixed-length vector syntax 2012-10-20 17:50:46 -07:00
Ben Striegel
41c37d9d0f ...missed a merge marker on that last rebase 2012-10-20 17:50:46 -07:00
Ben Striegel
614624a34c No longer parse old fixed-length vec sytnax 2012-10-20 17:50:46 -07:00
Ben Striegel
ac81fff229 Remove old fixed-length vector syntax 2012-10-20 17:50:46 -07:00
Philipp Brüschweiler
4174688dd4 libsyntax: adapt the pretty printer for the new fixed size array syntax
`[int]/5` -> `[int * 5]`
2012-10-20 17:50:46 -07:00
Patrick Walton
754704ea94 rustc: Implement intra-crate static methods on anonymous trait implementations. r=nmatsakis 2012-10-18 14:29:18 -07:00
Tim Chevalier
b03c71f629 Remove dead type definition 2012-10-18 12:19:43 -07:00
Erick Tryzelaar
a7ecde3323 libcore: minor code cleanup.
This is minor and probably completely inconsequential to performance,
but I find vec::map to be more clear than vec::each and a push.
2012-10-18 10:09:57 -07:00
Philipp Brüschweiler
e7e1bab27f libsyntax: refactor the parser to consider foreign items as items
parse_item_or_view_item() would drop visibility if none of the conditions
following it would hold. This was the case when parsing extern {} blocks,
where the function was only used to parse view items, but discarded the
visibility of the first not-view item.
2012-10-17 15:34:55 -07:00
Tim Chevalier
b532a8e585 Line length 2012-10-17 12:03:18 -07:00
Tim Chevalier
7236472e67 word => word_space 2012-10-17 12:03:18 -07:00
Jyun-Yan You
66151d02f5 remove duplicate visibility and fix indentation 2012-10-17 12:03:18 -07:00
Jyun-Yan You
ca5506a5de fix the indentation of foreign constant 2012-10-17 12:03:18 -07:00
Patrick Walton
91ae5412d8 rustc: Merge module and type namespaces. r=brson 2012-10-15 15:35:36 -07:00
Tim Chevalier
7237268b70 Allow enum discriminator exprs to refer to declared consts
Also some work towards #3521

Closes #2428
2012-10-15 12:28:29 -07:00
Erick Tryzelaar
ab89b5c294 libstd: make Serializer a trait-level typaram 2012-10-15 08:25:23 -07:00
Tim Chevalier
c5fa613498 Make moves explicit in libsyntax 2012-10-12 20:43:37 -07:00
Tim Chevalier
335e5ca33b Add a colon, make an error message clearer 2012-10-12 20:43:37 -07:00
Niko Matsakis
98887cc7ee remove ctor from ast (take 2) (no review: just dead code removal) 2012-10-12 19:46:37 -07:00
Niko Matsakis
cb55e246ba Use the Nth impl when translating a static method call, instead
of the 0th.  0th is only correct when there are no bound tps
on the trait.

Fixes #3741.
2012-10-12 17:46:43 -07:00
Graydon Hoare
57b4d10ff6 bump version to 0.5. 2012-10-12 16:41:32 -07:00
Kevin Cantu
1bede1f5e0 Replace several common macros of the form #m[...] with m!(...)
This commit replaces nearly all remaining uses of #fmt, #debug, #error,
and #info, and fixes some error messages...
2012-10-12 14:14:48 -07:00
Tim Chevalier
ec6311211f Update FIXME number 2012-10-11 16:00:30 -07:00
Tim Chevalier
6854265161 Remove comment that is now false 2012-10-11 16:00:30 -07:00
Tim Chevalier
bfbb7197d7 Update FIXME numbers 2012-10-11 16:00:30 -07:00
Tim Chevalier
5a8ba073bc Make to_str pure and fix const parameters for str-mutating functions
Two separate changes that got intertwined (sorry):

Make to_str pure. Closes #3691

In str, change functions like push_char to take an &mut str instead of
an &str. Closes #3710
2012-10-11 14:17:59 -07:00
Tim Chevalier
15d8457104 Merge pull request #3700 from erickt/cargo-interner
allow interner cache to be shared across parsers (#3699)
2012-10-09 14:50:01 -07:00
Tim Chevalier
22efa39382 Revert "Revert "Remove old auto_serialize2 code (needs snapshot)""
This reverts commit a33535e441.
2012-10-08 17:43:45 -07:00
Tim Chevalier
a33535e441 Revert "Remove old auto_serialize2 code (needs snapshot)"
This reverts commit 0bd6da8a8c.
2012-10-08 11:58:54 -07:00
Erick Tryzelaar
1ac75d2269 allow interner cache to be shared across parsers (#3699) 2012-10-08 10:42:13 -07:00
Niko Matsakis
ed3689d57c remove ctor from ast 2012-10-08 06:36:42 -07:00
Erick Tryzelaar
0bd6da8a8c Remove old auto_serialize2 code (needs snapshot) 2012-10-07 17:20:19 -07:00
Erick Tryzelaar
eb626e7119 Remove the old serializers (needs snapshot) 2012-10-07 17:20:19 -07:00
Erick Tryzelaar
d301dd3686 remove the old auto_serialize syntax extension 2012-10-07 14:56:18 -07:00
Erick Tryzelaar
e1c517ca48 migrate libsyntax/rustc to auto_serialize2 2012-10-07 10:32:25 -07:00
Simon BD
0e3bec0ced Merge remote-tracking branch 'original/incoming' into incoming 2012-10-06 13:15:18 -05:00
Tim Chevalier
f96a2a2ca1 Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Tim Chevalier
05999290e2 Finally removing all uses of by-mut-ref
The code for the mode itself is still there.
2012-10-05 21:03:40 -07:00
Tim Chevalier
45345bda6a Remove uses of mutable ref mode.
It's still in the compiler right now, but warned about
2012-10-05 16:57:37 -07:00
Tim Chevalier
f8bc0d2545 Revert "wip"
This reverts commit ca49fd402a.
2012-10-05 16:10:08 -07:00
Tim Chevalier
ca49fd402a wip 2012-10-05 15:39:12 -07:00
Tim Chevalier
e16dbb7888 Demode some code using by-mutbl-ref; warn about by-mutbl-ref
The parser now warns about use of mutbl-ref mode, though it's kind
of a lie since this commit doesn't remove support for the mode.

Changed move_val_init to have stage0 and stage1/2 versions, the latter of
which is demoded.

Changed the type that the typechecker expects the move_val_init
intrinsic to have. After this is pushed, I can make a new snapshot,
which will remove the need for the stage0 versions.
2012-10-05 15:37:01 -07:00
Tim Chevalier
8fc60af441 Remove by-copy mode from std, mostly
One instance remains in net_tcp due to a foreign fn. Lots of
instances remain in serialization.rs, but IIRC that is being removed.

I had to do unholy things to task-perf-word-count-generic to get it
to compile after demoding pipes. I may well have messed up its
performance, but it passes.
2012-10-04 19:59:47 -07:00
Simon BD
efcd2385ea Merge remote-tracking branch 'original/incoming' into incoming
Conflicts:
	src/libstd/json.rs
	src/libstd/sort.rs
2012-10-03 21:47:09 -05:00
Patrick Walton
2f451a7bd7 rustc: Only allow imports marked with "pub" to be imported from other modules 2012-10-02 18:15:19 -07:00
Patrick Walton
9284179311 libstd: Switch off legacy modes in both core and std. 2012-10-02 12:20:06 -07:00
Erick Tryzelaar
2569adc5ea Split auto_serialize2 into two macros 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
4f4160ee3b Factor out auto_serialize2's impls from each other. 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
c46b6f9efb auto_serialize2 should deserialize structs using read_struct 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
81423a3866 Add deserializable and more types to serialization2 2012-10-01 20:43:59 -07:00
Tim Chevalier
b18320446e Move over to calling ptr::addr_of
Everything should now call ptr::addr_of instead of
ptr::p2::addr_of. Only the pipes macro code when compiled
by stage0 will call ptr::p2::addr_of. Needs a snapshot to get
rid of that.
2012-10-01 15:12:09 -07:00
Tim Chevalier
72ae42627b Call 'new' instead of 'old' extfmt code, preparing for snapshot 2012-10-01 15:12:09 -07:00
Tim Chevalier
3639d38d5c Add a demoded version of ptr::addr_of
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.

core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00
Brian Anderson
c9fb1b19aa Add allow(deprecated_\*) to syntax, rustc, rustdoc, et al 2012-09-28 18:38:59 -07:00
Tim Chevalier
fec96b2ae0 Demoding in iter: any, all, map_to_vec, flat_map_to_vec, filter_to_vec 2012-09-28 17:44:15 -07:00
Niko Matsakis
565b39b302 rename iter2 to each2, make it follow iterator protocol 2012-09-28 16:13:03 -07:00
Brian Anderson
9e0a43c932 Pretty-print item visibility modifiers 2012-09-28 15:04:23 -07:00
Tim Chevalier
2f4ee89119 Demode extfmt
Needs a snapshot before this can be completed, because I changed
the mode for conv_poly.
2012-09-28 13:47:45 -07:00
Niko Matsakis
21519bc7e0 demode vec 2012-09-28 13:27:45 -07:00
Erick Tryzelaar
b68d287780 libsyntax: Fix long line 2012-09-27 19:24:11 -07:00
Brian Anderson
463d5d5f0b Merge pull request #3607 from gutworth/incoming
utterly trivial refactoring
2012-09-27 18:35:43 -07:00
Brian Anderson
438bdd687b core: More option demoding 2012-09-27 17:49:10 -07:00
Simon BD
868d10160f Put function argument last in sort function. Fixes #3265. 2012-09-27 19:05:13 -05:00
Patrick Walton
0bcb3bc536 libsyntax: Parse visibility modifiers before foreign items 2012-09-27 12:48:09 -07:00
Benjamin Peterson
459fe6ad55 factor out common lines 2012-09-27 15:05:06 -04:00
Brian Anderson
e8fe718bfd core: Replace map/map_default with map_ref/map_default_ref 2012-09-26 20:15:23 -07:00
Tim Chevalier
996ec62cbf Remove spurious by-ref argument to destructors
Destructors were internally declared with an extra (hidden) nil-typed
argument that was passed in by-ref mode. This was causing spurious
mode warnings. Deleted it. Also some misc. cleanup because I
couldn't help myself.
2012-09-26 19:42:02 -07:00
Brian Anderson
8f0e9ff029 Long lines 2012-09-26 18:23:05 -07:00
Niko Matsakis
67a8e7128a Demode vec::push (and convert to method) 2012-09-26 18:02:07 -07:00
Erick Tryzelaar
b96af73159 turn ast::ident into a struct
This will help with the auto_serialize2 migration. We have to change
ident from a type alias to uint into a unique type. We need to use
a struct instead of a "enum ident = token::str_num" because structs
support constants, but newtypes do not.
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
c0b9986c8f libstd: change serialization2 to take &self argument methods
Unfortunately this trips over issue (#3585), where auto-ref isn't
playing nicely with @T implementations. Most serializers don't
care, but prettyprint2 won't properly display "@" until #3585 is
fixed.
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
cd93441705 auto_serialize2 should fully qualify std::serialization2::deserialize 2012-09-26 16:20:24 -07:00
Erick Tryzelaar
99d84bacc8 libsyntax: remove quasiquoter from auto_serialize2 2012-09-26 16:20:24 -07:00
Erick Tryzelaar
2ba9d2a888 libsyntax: implement auto_serialize2 for enums, records, and structs 2012-09-26 16:20:24 -07:00
Erick Tryzelaar
dd502fc6e4 Allow hashmaps to infer their types 2012-09-26 16:20:24 -07:00
Eric Holk
135ebca8aa Refactoring ReaderUtil trait, combining it with the traitless impl on Reader. 2012-09-26 15:55:42 -07:00
Tim Chevalier
101bc62ad9 Revert "fix modes on dtors"
This reverts commit d38b97a170.

(Accidentally checked this in, oops)
2012-09-26 10:43:11 -07:00
Tim Chevalier
d38b97a170 fix modes on dtors 2012-09-26 10:42:11 -07:00
Vincent Belliard
ef23d77633 fix issue #3535 and add colon between mode and type when dumping funcion prototype 2012-09-26 07:48:19 -07:00
Graydon Hoare
9c6ae65865 Support visibility qualifiers in crate directives properly. 2012-09-24 17:29:32 -07:00
Brian Anderson
afd91f8a56 Register snapshots. Remove redundant Eq impls, Makefile hacks 2012-09-23 23:01:49 -07:00
Brian Anderson
4a78f9b166 core: Demode option 2012-09-23 17:15:00 -07:00
Niko Matsakis
0a26edca75 Fix trans for region patterns (&P) 2012-09-23 13:30:20 -05:00
Niko Matsakis
ba3eebd41d Make it illegal to use modes in a fn signature with providing
an explicit variable name. (Step one to changing the defaults)

First step to #3535
2012-09-23 13:30:13 -05:00
Niko Matsakis
3d59ac3a19 De-mode vec::map, vec::eachi, vec::rev_each, vec::rev_eachi 2012-09-21 19:13:55 -07:00
Patrick Walton
f3d6c506a4 libsyntax: Fix botched merge 2012-09-21 18:44:00 -07:00
Patrick Walton
d48396c986 libcore: De-mode str 2012-09-21 18:37:06 -07:00
Graydon Hoare
dffe188991 Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports]; 2012-09-21 18:11:43 -07:00
Brian Anderson
f5be40384f Revert "syntax: Make attributes sendable for rustdoc's benefit"
This reverts commit 90e3665fa7.
2012-09-20 18:15:39 -07:00
Brian Anderson
90e3665fa7 syntax: Make attributes sendable for rustdoc's benefit 2012-09-20 17:37:21 -07:00
Patrick Walton
9117dcb968 rustc: De-mode all overloaded operators 2012-09-20 09:48:05 -07:00
Brian Anderson
1397dca2dd core: Move TLS to task::local_data 2012-09-19 19:08:32 -07:00
Niko Matsakis
cfed923600 demode the each() method on vec and other iterables. 2012-09-19 17:03:01 -07:00
Graydon Hoare
1ffd90edbc Remove redundant hashmap constructor functions. 2012-09-19 15:51:44 -07:00
Brian Anderson
0c82c00dc4 libsyntax: Remove the restricted keyword concept 2012-09-19 11:44:05 -07:00
Brian Anderson
76f8cfb26c libsyntax: Move 'unsafe' to the strict keywords list 2012-09-19 11:44:05 -07:00
Niko Matsakis
9cf271fe96 De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Niko Matsakis
8d4928f780 Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"
This reverts commit 1be24f0758.

Not quite ready.
2012-09-18 21:41:13 -07:00
Niko Matsakis
1be24f0758 replace explicit calls to vec::each with vec::each_ref, partially demode str 2012-09-18 21:31:00 -07:00
Brian Anderson
2906f2de31 core: Rename 'unsafe' mod to 'cast' 2012-09-18 19:36:25 -07:00
Patrick Walton
e653d493fb rustc: Remove legacy mode inference, unless #[legacy_modes] is used 2012-09-18 15:53:04 -07:00
Erick Tryzelaar
d0d68c6036 libcore: make a copyless io::BytesWriter 2012-09-18 12:56:57 -07:00
Brian Anderson
2d11a04e74 libsyntax: Remove 'unchecked_blk' from AST 2012-09-18 11:51:17 -07:00
Brian Anderson
d0d8b7fe64 Remove 'unchecked' keyword 2012-09-18 11:31:58 -07:00
Niko Matsakis
efa6675f1d make filetype() include the "." (fixes #3412) 2012-09-18 11:29:53 -07:00
Brian Anderson
859a892eb0 Add allow(non_camel_case_types) to unconverted crates 2012-09-18 11:21:07 -07:00
Niko Matsakis
7107b4eff5 Have parser recognize static, self region.
Fixes a bug in methods that &self couldn't be referenced in the
body. Also fixes #2479.
2012-09-14 15:22:15 -07:00
Brian Anderson
d71179f410 Promote 'fail' to a strict keyword 2012-09-13 17:10:01 -07:00
Brian Anderson
7568dd4564 Promote 'const', 'copy', 'fn' to strict keywords 2012-09-12 16:00:22 -07:00
Brian Anderson
3057790f4b Rename 'contextual' keywords to 'temporary' 2012-09-12 15:22:34 -07:00
Brian Anderson
287114a3b9 Remove some transitional code 2012-09-12 15:09:21 -07:00
Niko Matsakis
5d540de769 fixup mutability of vec::each, make iter_bytes pure
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Tim Chevalier
86e02554fd Make moves in arguments explicit in libsyntax and rustc 2012-09-12 11:33:40 -07:00
Brian Anderson
320331fe35 Use a different strategy for transitioning to camel case extfmt 2012-09-12 11:22:48 -07:00
Niko Matsakis
8a8f200d10 Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
Fixes #3261
Fixes #3443
2012-09-11 21:25:01 -07:00
Brian Anderson
2c6c963f61 Convert core::extfmt to camel case 2012-09-11 19:41:07 -07:00
Brian Anderson
be1fdf983f Promote 'impl' from restricted keyword to strict 2012-09-11 19:28:44 -07:00
Brian Anderson
3d2a74a160 Reserve 'be' as a keyword 2012-09-11 19:26:48 -07:00
Brian Anderson
ea01ee2e9e Convert 'use' to 'extern mod'. Remove old 'use' syntax 2012-09-11 19:25:43 -07:00
Brian Anderson
fb851242b7 Promote 'pub' and 'priv' from restricted to strict keywords 2012-09-11 18:17:26 -07:00
Brian Anderson
27cc0a36b6 Promote 'struct' from a restricted keyword to a strict keyword 2012-09-11 17:15:33 -07:00
Brian Anderson
1203da3b9d Remove priv sections from classes. Obsolete the syntax 2012-09-11 15:29:37 -07:00
Brian Anderson
298eb8c726 Convert 'import' to 'use'. Remove 'import' keyword. 2012-09-10 19:04:26 -07:00
Brian Anderson
1a8a0a77b1 Camel case std::serialization 2012-09-10 19:02:57 -07:00
Tim Chevalier
f8b3eaae82 Make all moves explicit in libsyntax 2012-09-10 18:28:47 -07:00
Brian Anderson
6957af770b Report obsolete trait lists on structs 2012-09-10 18:12:35 -07:00
Brian Anderson
73eb894305 Report obsolete class method syntax 2012-09-10 17:48:33 -07:00
Brian Anderson
df79026169 Promote 'return' from a restricted keyword to a strict keyword 2012-09-10 17:27:10 -07:00
Brian Anderson
cb7a5395dd Convert std::map to camel case 2012-09-10 17:08:36 -07:00
Brian Anderson
93d3b8aa6b Convert class methods to impl methods. Stop parsing class methods 2012-09-10 16:13:08 -07:00
Tim Chevalier
1a33c25d6f Make moves explicit in pipes and pipe compiler 2012-09-10 15:15:10 -07:00
Patrick Walton
22b8757705 rustc: Make shape-based compare glue never called for comparison operators.
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Brian Anderson
ef9aa80438 Promote most restricted keywords to strict keywords 2012-09-10 12:07:19 -07:00
Brian Anderson
901543ff89 Reformat comments 2012-09-09 17:42:00 -07:00
Brian Anderson
e7a01b7383 Introduce 'strict' keywords, that may not be used as idents anywhere 2012-09-09 17:35:56 -07:00
Brian Anderson
528373b79b Turn most contextual keywords into restricted keywords 2012-09-09 16:53:47 -07:00
Brian Anderson
25dc59dc59 libsyntax: Parse and report errors for a few obsolete syntaxes 2012-09-08 20:04:21 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Brian Anderson
2810ea9a68 Convert 'again' to 'loop'. Remove 'again' keyword 2012-09-07 17:39:03 -07:00
Graydon Hoare
073df63c72 Fix long line. 2012-09-07 17:27:05 -07:00
Graydon Hoare
8b39e73697 Fix whitespace. 2012-09-07 17:26:10 -07:00
Graydon Hoare
5d823d46ad Migrate std::map to use core:#️⃣:Hash trait. Disable many hokey hashes. 2012-09-07 17:24:16 -07:00
Tim Chevalier
f5093dff7b Remove support for multiple traits in a single impl
There was half-working support for them, but they were never fully
implemented or even approved. Remove them altogether.

Closes #3410
2012-09-07 17:22:04 -07:00
Tim Chevalier
53ce42dc4f Implement &-patterns
Closes #2855
2012-09-07 17:09:07 -07:00
Graydon Hoare
e9f5a099df Add an ignore! macro, remove support for nested block comments, re: #2755. 2012-09-07 16:58:36 -07:00
Brian Anderson
249668f223 Remove module keyword 2012-09-07 16:53:21 -07:00
Brian Anderson
f0eae8f1c1 Convert field terminators to commas. Stop parsing semis. 2012-09-07 16:12:15 -07:00
Brian Anderson
2572e80355 Remove 'let' syntax for struct fields 2012-09-07 14:02:33 -07:00
Patrick Walton
c21b3ff818 rustc: Make "ne" use traits 2012-09-07 12:44:53 -07:00
Patrick Walton
feb014eb3c rustc: Add an "ne" method to the Eq trait, and implement it everywhere 2012-09-07 12:24:48 -07:00
Brian Anderson
b4e547d71a Remove struct ctors 2012-09-06 10:52:26 -07:00
Niko Matsakis
5e36a99794 Refactor trans to replace lvalue and friends with Datum.
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387, too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Brian Anderson
f7681f9236 Accept Copy, Send, Const, Owned, as kind bounds 2012-09-05 15:31:38 -07:00
Patrick Walton
e7fe903d88 libsyntax: Make "pub use" mean the same thing as the former "import" in all circumstances 2012-09-05 13:26:46 -07:00
Patrick Walton
47dac47e96 rustc: "import" -> "use" in .rc files 2012-09-05 11:46:25 -07:00
Patrick Walton
fba673b26b rustc: Implement private methods.
Doesn't work cross-crate yet.
2012-09-04 18:30:27 -07:00
Tim Chevalier
451da07718 Allow anonymous extern mods
Now you can write:

extern {
  f() -> int;
}

and f will be accessible in the enclosing scope.
2012-09-04 16:41:19 -07:00
Brian Anderson
200959d7ce Remove 'with' 2012-09-04 15:47:04 -07:00
Brian Anderson
ab9cf45a7c syntax: Remove 'of' and 'check' from keyword table 2012-09-04 15:43:46 -07:00
Brian Anderson
d3e75ea375 Parse 'loop' and 'again' the same 2012-09-04 13:37:11 -07:00
Patrick Walton
8ff18acc82 libsyntax: "import" -> "use" 2012-09-04 11:43:23 -07:00
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