Commit Graph

152 Commits

Author SHA1 Message Date
Brian Anderson
3b396d17d6 Merge remote-tracking branch 'thestinger/old_map' into incoming
Conflicts:
	src/test/bench/core-map.rs
2013-02-03 17:56:49 -08:00
Patrick Walton
04eb9b4eb0 librustc: Fix bugs regarding to impl privacy. rs=bugfix 2013-02-03 17:50:27 -08:00
Daniel Micay
319eeb1c79 rename map -> oldmap and mark it as deprecated
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Nick Desaulniers
6fb4239bb3 Replace most invocations of fail keyword with die! macro 2013-01-31 22:25:12 -08:00
Nick Desaulniers
aee7929469 Replace most invocations of fail keyword with die! macro 2013-01-31 20:12:49 -08:00
Patrick Walton
366812a5c3 librustc: Change self as a type to Self everywhere. r=brson 2013-01-30 19:52:45 -08:00
Patrick Walton
49472ec4c9 librustc: Remove legacy exports from the language. r=brson 2013-01-30 18:11:43 -08:00
Patrick Walton
592c2e1db4 test: Remove export from the tests, language, and libraries. rs=deexporting 2013-01-30 15:56:40 -08:00
Patrick Walton
2a65842c3a test: De-export aux, bench, compile-fail, and run-fail. rs=deexporting 2013-01-30 15:08:45 -08:00
Brian Anderson
02e907b648 Remove oldcomm from the test suite 2013-01-30 00:48:10 -08:00
Tim Chevalier
a30ea013f5 Handle supertrait calls in default methods
Add a new method_super origin for supertrait methods. Also make
coherence create a table that maps pairs of trait IDs and self types
to impl IDs, so that it's possible to check a supertrait method
knowing only its index in its trait's methods (without knowing all
supertraits for a given trait).

r=nmatsakis and graydon -- with hope, we'll revamp all of this code as
per #4678, but for now this fixes the bug.

Closes #3979
2013-01-29 20:33:22 -08:00
Patrick Walton
6ce74460e6 librustc: Disallow trait bounds in types, enumerations, and structure definitions. r=tjc 2013-01-29 10:42:58 -08:00
Patrick Walton
eb4d39e1fe libstd: Remove "dual impls" from the language and enforce coherence rules. r=brson
"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.
2013-01-29 10:42:45 -08:00
Tim Chevalier
6d4907a742 testsuite: Eliminate uses of structural records from most run-pass tests
Except the pipes tests (that needs a snapshot)
2013-01-26 11:35:17 -08:00
Patrick Walton
163b97b7bb librustc: Make C functions unsafe 2013-01-24 13:52:21 -08:00
Graydon Hoare
721c174b6c test: fix issue 2526 'unsafe' block-keyword, r=burningtree. 2013-01-23 16:28:10 -08:00
Niko Matsakis
9fed56ed90 When decoding types, indicate to the def-id conversion function what kind of
def-id we have, so that the inliner can distinguish between external and
internal def-ids.  Also add some comments explaining the distinction!

Fixes #4516.

r=graydon
2013-01-17 18:45:45 -08:00
Tim Chevalier
e0850d11ec Add test cases: one xfailed, one not 2013-01-10 14:16:02 -08:00
Niko Matsakis
2b92962aa2 A collection of refactorings that I found it hard/tiresome to divide:
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
2013-01-09 14:59:07 -08:00
Patrick Walton
5bd8692e9d test: Fix a bunch of compile-fail tests. rs=bustage 2012-12-28 19:36:35 -08:00
Patrick Walton
40eaecbd47 test: Fix a couple more tests. rs=bustage 2012-12-28 18:02:20 -08:00
Patrick Walton
f67c37263e test: Fix a bunch of run-pass tests. rs=bustage 2012-12-28 17:17:05 -08:00
Brian Anderson
97ddf3c7bd Stop resolving static methods at the module level. Closes #4179 2012-12-18 18:35:18 -08:00
Tim Chevalier
3a5b6a79c6 Fix trait-inheritance-overloading-xc and un-xfail 2012-12-14 15:25:32 -08:00
Brian Anderson
e6d1b02359 Rename core::comm to core::oldcomm 2012-12-14 14:59:32 -08:00
Brian Anderson
ed4fac01b5 Rename Send trait to Owned 2012-12-13 15:52:50 -08:00
Brian Anderson
7ca94369da Fix encoding of trait static method paths. Closes #4097. r=pcwalton 2012-12-13 15:02:42 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05:22 -08:00
Graydon Hoare
d1affff623 Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
Patrick Walton
3f78e0ecc0 librustc: Fix bug preventing cross-crate struct destructuring from working. rs=bugfix 2012-12-10 12:38:31 -08:00
Tim Chevalier
3f7b112b16 Update and un-xfail crate-method-reexport-grrrrrrr2
Closes #3155
2012-12-08 23:40:17 -08:00
Brian Anderson
10c9d7921d Trait constraints are separated by space, not comma 2012-12-07 15:54:17 -08:00
Brian Anderson
4f3cc01487 Fix cross-crate inlining of static functions 2012-12-05 18:09:52 -08:00
Patrick Walton
e1685dd990 test: More bustage fixes. rs=me 2012-12-05 17:36:51 -08:00
Patrick Walton
6084032270 test: More run-pass test fixes 2012-12-05 16:51:32 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -08:00
Tim Chevalier
daf28a421a Disallow dereferencing enum types when the variant is private
If an enum type's only variant is private, disallow dereferencing
values of its type.

Due to #4082, this only applies to enums that are in the same crate.

r=pcwalton

Closes #818
2012-11-30 12:45:10 -08:00
Brian Anderson
78ee821154 Implement trait inheritance for bounded type parameters 2012-11-29 18:10:11 -08:00
Patrick Walton
9e1c9be16f librustc: Make the Drop trait use explicit self 2012-11-29 11:06:15 -08:00
Patrick Walton
7bc29c62d0 libcore: Add explicit self to all overloaded operators but Add and Index. r=brson 2012-11-26 19:35:52 -08:00
Patrick Walton
de0268b693 librustc: Fix translation of cross-crate inline or generic methods with explicit self. rs=blocking-snapshot 2012-11-26 18:09:12 -08:00
Tim Chevalier
f8bd95589f Add comments explaining why these tests are xfailed 2012-11-15 18:41:17 -08:00
Patrick Walton
64305174c9 librustc: Fix cross-crate reexports. rs=blocking-servo 2012-11-15 17:15:02 -08:00
Ben Striegel
f4a5a76aa4 Convert the test suite to use the Drop trait 2012-11-14 19:26:37 -08:00
Brian Anderson
e2f33e6883 Add xfailed test for #3908 2012-11-02 15:57:47 -07:00
Brian Anderson
1c8c1b2181 Add xfailed test for #3907 2012-11-02 15:37:47 -07:00
Brian Anderson
b2af873b76 Merge remote-tracking branch 'luqmana/incoming' 2012-10-22 21:44:53 -07:00
Patrick Walton
ec1c60c4d6 rustc: Implement generic cross-crate trait inheritance 2012-10-22 18:00:48 -07:00
Luqman Aden
e1db959ec2 rustc: add new intrinsics - atomic_cxchg{_acq,_rel} 2012-10-21 22:23:50 -04:00
Patrick Walton
754704ea94 rustc: Implement intra-crate static methods on anonymous trait implementations. r=nmatsakis 2012-10-18 14:29:18 -07:00