Commit Graph

536 Commits

Author SHA1 Message Date
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