Graydon Hoare
546f3dbbf5
Build the export_map2 from visibility markers, unless #[legacy_exports];
2012-09-24 17:29:32 -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
Patrick Walton
e653d493fb
rustc: Remove legacy mode inference, unless #[legacy_modes] is used
2012-09-18 15:53:04 -07:00
Brian Anderson
ea01ee2e9e
Convert 'use' to 'extern mod'. Remove old 'use' syntax
2012-09-11 19:25:43 -07:00
Brian Anderson
1203da3b9d
Remove priv sections from classes. Obsolete the syntax
2012-09-11 15:29:37 -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
Brian Anderson
3bd1f32cd9
Convert all kind bounds to camel case. Remove send, owned keywords.
2012-09-07 18:10:11 -07:00
Brian Anderson
2572e80355
Remove 'let' syntax for struct fields
2012-09-07 14:02:33 -07:00
Brian Anderson
b4e547d71a
Remove struct ctors
2012-09-06 10:52:26 -07:00
Patrick Walton
f686896f60
test: "import" -> "use"
2012-09-05 12:32:05 -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
161a82e433
Camel case various core constructors
2012-08-27 17:22:18 -07:00
Brian Anderson
8337fa1a54
Camel case the option type
2012-08-26 15:56:16 -07:00
Ben Blum
01a5845db5
fix atomic intrinsic test cases
2012-08-23 17:19:35 -04:00
Paul Stansifer
29f32b4a72
m1!{...}
-> m1!(...)
2012-08-23 11:14:14 -07:00
Brian Anderson
3ab4b014cf
Remove the class keyword
2012-08-17 10:13:45 -07:00
Graydon Hoare
1bac541e26
Attempt to get issue 3012 test working on win32.
2012-08-16 14:30:14 -07:00
Tim Chevalier
ee2f0dd638
Test case for #3012
2012-08-15 18:34:41 -07:00
Brian Anderson
9c6890f488
Convert more core types to camel case
2012-08-15 17:46:05 -07:00
Brian Anderson
74c69e1053
Convert more core types to camel case
2012-08-15 14:14:20 -07:00
Brian Anderson
83b42c806f
Add test for #2472
2012-08-14 21:17:01 -07:00
Brian Anderson
5394e34aa4
core: Camel case some lesser-used modules
2012-08-13 18:59:48 -07:00
Brian Anderson
6a0720b439
Convert impls to new syntax
2012-08-08 18:19:24 -07:00
Michael Sullivan
7f7f47620e
Implement static typeclass methods. Closes #3132 .
2012-08-07 17:18:14 -07:00
Patrick Walton
793c0a1116
test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242 )
2012-08-06 21:40:49 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Lindsey Kuper
2f832d4b2d
test: "iface" -> "trait" in filenames.
2012-08-02 17:58:56 -07:00
Brian Anderson
b355936b4d
Convert ret to return
2012-08-01 19:16:06 -07:00
Lindsey Kuper
439afaa329
Change remaining "iface" occurrences to "trait"; deprecate "iface"
2012-07-31 11:52:16 -07:00
Paul Stansifer
a9cc5066ee
Change syntax extension syntax: #m[...]
-> m!{...}
.
2012-07-30 18:38:15 -07:00
Eric Holk
22e3a8506f
Test case for #3005
2012-07-24 14:56:02 -07:00
Erick Tryzelaar
6d042c0f2d
tests: Rename to avoid colliding with real rust-zmq.
2012-07-23 17:15:30 -07:00
Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Michael Sullivan
2ea9c8df0f
Accept prefix notation for writing the types of str/~ and friends.
2012-07-12 16:52:26 -07:00
Brian Anderson
46fba10fe8
rustc: Make all impls even more reachable
...
With this we write metadata for all impls so that we can properly find
reexported impls.
2012-07-12 15:09:33 -07:00
Tim Chevalier
c0961bb88f
Test for #2723 . Closes #2723
2012-07-11 12:34:21 -07:00
Josh Matthews
a7f6e00944
Fix metadata serialization of foreign functions. Properly take the value of foreign functions from other crates to fix #1840 .
2012-07-09 13:13:49 -07:00
Gareth Daniel Smith
be0141666d
convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-04 19:18:13 -07:00
Ben Striegel
f2e2a14f36
Remove empty argument lists from do expressions
2012-07-04 17:21:29 -07:00
Graydon Hoare
debb7e4641
Switch 'native' to 'extern' (or 'foreign' in some descriptions)
2012-07-03 16:11:00 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Graydon Hoare
697f1e38d6
Change 'native' and 'crust' to 'extern'.
...
This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.
What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
2012-06-26 16:18:37 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Tim Chevalier
da470ff5b8
Merge
2012-06-25 13:29:41 -07:00
Graydon Hoare
f60cdf27e7
Remove 'implements' keyword in favour of :, part of #2301 .
2012-06-22 18:57:20 -07:00
Tim Chevalier
588c1eb41f
Remove resources from remaining test cases
2012-06-22 13:11:29 -07:00
Tim Chevalier
c50eea17d4
Test for #2242 (xfailed for now)
2012-06-20 16:25:46 -07:00
Tim Chevalier
210db7d8d4
Test case for #2631
2012-06-15 15:21:17 -07:00
Tim Chevalier
e5a5fc2029
Allow impls to be re-exported
...
It was a little hard for me to believe, but it seems that re-exporting
an impl doesn't work at a, because encoder::encode_info_for_mod requires
that all the impls in the current module's impl map be local (that is,
bound to a value in the current crate's item map). Fixed it.
Closes #2414 .
2012-06-13 15:52:00 -07:00
Tim Chevalier
6f95c79b95
Traverse types in reachability
...
Issue 2526 showed a test case where a library exported only a type
that was a synonym for a class. Because the class's destructor wasn't
getting marked as reachable, its linkage was wrongly getting set to
"internal". The solution is for reachability to traverse types.
Closes #2526 .
2012-06-13 11:57:01 -07:00
Tim Chevalier
eadd74b5b6
Test case for previous commit
...
(basically a stripped-down version of comm, and a "driver" that
constructs a new port)
2012-06-12 17:37:04 -07:00
Niko Matsakis
8ebbf464f5
minor changes to tests so they pass borrowck
2012-06-06 18:37:58 -07:00
Eric Holk
07830612fd
Adding a test to make sure CCI works with capture clauses.
2012-05-30 12:03:51 -07:00
Tim Chevalier
b30daa6eef
Test case for issue 2380
2012-05-29 17:05:17 -07:00
Brian Anderson
432c6cbde9
core: Make range follow the for loop protocol
2012-05-26 02:28:00 -07:00
Niko Matsakis
81caf926b4
test for #2378
2012-05-18 20:00:50 -07:00
Niko Matsakis
f1129635ee
report ambig impl methods
2012-05-02 21:47:14 -07:00
Tim Chevalier
3d4ef74c9b
Encode the ifaces a class implements in metadata
...
This lets you use class A as if it had type B if A implements B,
and A and B are in different crates from your own.
Closes #2285
2012-05-02 13:38:56 -07:00
Tim Chevalier
164039e867
Don't re-export a glob-imported ID when the same ID is defined within
...
a module
See the test case I added (issue-2316-c) for a concrete example.
issue-2316 also contains the originally reported test case. resolve
was using bitwise or instead of logical or when checking exports,
resulting in excessively eager evaluation. A one-line fix that took
six hours to isolate ;-)
2012-05-01 08:43:17 -07:00
Niko Matsakis
b04b415e0d
encode the borrowing table, add a simple cross-crate borrowing test
2012-04-23 16:41:11 -07:00
Brian Anderson
7235f3cee2
syntax: Eliminate 'mutable' keyword. Closes #2254
2012-04-21 14:27:20 -07:00
Brian Anderson
c461fc869c
test: Add xfailed test for #2196
2012-04-16 13:51:40 -07:00
Tim Chevalier
d7ba59eb6e
Test that a class can implement an interface defined in a different crate
2012-04-11 18:55:30 -07:00
Tim Chevalier
fd26743bed
Generic classes and generic class methods work cross-crate
...
Classes can have ty params now. So can methods inside classes.
That was probably true before, but now it should still work if you
call methods in a class that's defined in a different crate. Yay!
2012-04-10 11:01:36 -07:00
Haitao Li
1dac883282
test: Remove duplicated auxliary tests
2012-04-10 16:59:35 +08:00
Niko Matsakis
24e921f7d4
make anything used in a resource body always reachable
...
(they appear to be uncond. inlined)
Fixes #2170 .
2012-04-09 16:36:59 -07:00
Haitao Li
2ce28899e4
test: Don't share auxiliary modules
2012-04-09 00:18:18 +08:00
Haitao Li
7d227f21f7
Check metadata hash when loading transitive dependent crates
...
Fix issue #2138
2012-04-08 21:19:15 +08:00
Brian Anderson
a6e748a1d9
rustc: Hash the CMH into symbol names
2012-04-07 17:50:49 -07:00
Brian Anderson
0094ffd99b
test: Add test for mismatched nominal types when using multiple crate vers
2012-04-07 17:40:34 -07:00
Brian Anderson
e0f2341da1
test: Add another test using multiple versions of the same crate
2012-04-07 17:40:25 -07:00
Haitao Li
7aaa120bcc
Check version when resolving transitive dependent crates
...
Issue #2138
2012-04-08 02:05:09 +08:00
Haitao Li
2f42b14b4f
Use version and hash in crate_map name
...
Related issue #2137
2012-04-07 22:11:23 +08:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Brian Anderson
9c88e5ef5a
test: Refactor the crateresolve tests
...
Keep their aux builds from stomping on each other
2012-04-06 10:58:03 -07:00
Brian Anderson
2577bd9df3
rustc: Don't assume that all crates with the same name are the same
2012-04-05 20:53:16 -07:00
Tim Chevalier
c7082ce8e8
Require "self" as base expression for intra-class method or field references
...
All field or method references within a class must begin with "self." now.
A bare reference to a field or method in the same class will no longer
typecheck.
2012-03-29 12:22:01 -07:00
Tim Chevalier
edb747ceed
Enforce mutability declarations in classes; correct shapes for classes
...
1. Enforce mutability declarations on class fields. Don't allow any
mutation of class fields not declared as mutable (except inside the
constructor).
2. Handle classes correctly in shape (treat classes like records).
2012-03-27 22:11:58 -07:00
Graydon Hoare
6e6798c4e1
Bulk-edit mutable -> mut.
2012-03-26 18:35:18 -07:00
Tim Chevalier
11610f9ca1
In typeck, don't call ty::store_iface_methods on private methods
...
This was resulting in a different error message depending on whether
the private method you were trying to call was in the same crate
or a different one.
2012-03-26 10:46:37 -07:00
Tim Chevalier
aae14e352a
Allow methods to call other methods in the same class
2012-03-23 23:10:45 -07:00
Tim Chevalier
bebdfe8ce8
Add another test for cross-crate method calls
2012-03-23 23:10:45 -07:00
Niko Matsakis
042c532a08
Implement new inference algorithm.
2012-03-23 21:47:28 -07:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Tim Chevalier
30c272cb3a
methods work
...
Cross-crate method calls don't work yet. Added
run-pass/class-method-cross-crate to test that, but it's xfailed
References to fields within methods don't work yet. Added
run-pass/class-methods to test that, but it's also xfailed
2012-03-21 13:53:21 -07:00
Tim Chevalier
1680ccce1e
Classes WIP
...
Cross-crate metadata for classes works well enough that programs with
classes in other crates compile successfully, but output wrong results.
Checking in work so far to avoid merge hassles. (Tests are xfailed.)
2012-03-16 15:28:05 -07:00
Niko Matsakis
9086c6f5a2
merge all auto_serialize tests into one
2012-03-13 21:30:07 -04:00
Niko Matsakis
b30cb8e43a
implement deserialization, rename mk_mem_buffer() to mem_buffer()
2012-03-13 21:30:07 -04:00
Brian Anderson
a0f0a704b0
core: Clean up comments and exports
2012-03-10 00:35:02 -08:00
Niko Matsakis
2bfed908e3
Fix #1941 : inlining of items that themselves contain nested items
...
The fix is to drop nested items from the encoded AST. Nested items may
themselves be inlined, but that is an independent question.
2012-03-07 18:06:29 -08:00
Niko Matsakis
def72bda47
retool inline encoding to handle methods, fix tests
2012-03-02 06:47:25 -08:00
Niko Matsakis
1fd9abaa47
rename aux to auxiliary, since aux is apparently reserved on windows
2012-02-28 06:45:33 -08:00