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
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