Patrick Walton
a3f728238b
librustc: Forbid chained imports and fix the logic for one-level renaming imports
2013-03-02 16:49:30 -08:00
Niko Matsakis
4ecb672d7f
Remove legacy object creation mode, and convert remaining uses of it
2013-02-28 20:28:04 -05:00
Patrick Walton
2859c1ac6d
librustc: Enforce cross-crate method privacy
2013-02-28 11:32:26 -08:00
Patrick Walton
107bf96ff0
librustc: Mark all type implementations public. rs=impl-publicity
2013-02-28 11:32:24 -08:00
Ben Striegel
43d43adf6b
Turn old drop
blocks into Drop
traits
2013-02-27 19:14:19 -05:00
Patrick Walton
07c3f5c0de
librustc: Forbid pub
or priv
before trait implementations
2013-02-27 09:40:16 -08:00
Patrick Walton
a08eda4b63
test: Residual de-muting of the test suite. rs=demuting
2013-02-25 15:15:20 -08:00
Patrick Walton
82062a6348
test: De-mut the test suite. rs=demuting
2013-02-22 18:35:01 -08:00
Brian Anderson
dab6a85230
core: Extract comm from pipes. #4742
2013-02-21 17:36:54 -08:00
Patrick Walton
bf2a225c0b
librustc: Separate most trait bounds with '+'. rs=plussing
2013-02-20 21:14:20 -08:00
Seth Pink
1f4c758f9b
Remove use of capture clause #4965
2013-02-17 11:02:23 +10:00
Patrick Walton
bb833ca0f0
librustc: Stop parsing impl Type : Trait
and fix several declarations that slipped through. r=tjc
2013-02-15 16:59:56 -08:00
Luqman Aden
178882c98f
tests/tutorials: Get rid of move
.
2013-02-15 02:49:55 -08:00
Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
Patrick Walton
e07623d70b
librustc: Make monomorphic newtype structs work cross-crate
2013-02-13 09:47:20 -08:00
bors
6016214101
auto merge of #4900 : luqmana/rust/core_os_errors, r=graydon
...
Rewrote the last pull request (#4859 ) to not require on llvm for core.
Also fixes #2269 .
2013-02-12 21:27:22 -08:00
Graydon Hoare
1d82d8dd5d
Revert "librustc: Make monomorphic newtype structs work cross-crate"
...
This reverts commit a8f039a085
.
2013-02-12 09:02:17 -08:00
Luqman Aden
70185fdcc2
rt: remove last_os_error and adjust tests.
2013-02-11 23:49:49 -05:00
Patrick Walton
a8f039a085
librustc: Make monomorphic newtype structs work cross-crate
2013-02-11 20:09:11 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00
bors
bffe3088c7
auto merge of pull req #4777 from thestinger/rust, r=graydon
2013-02-04 17:24:40 -08:00
Erick Tryzelaar
9adfa59d8e
core: convert ToStr::to_str to take explicit &self
2013-02-03 20:47:26 -08:00
Daniel Micay
8e643525d4
oldmap: use &K instead of K in find and get
2013-02-03 23:30:56 -05:00
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
Tim Chevalier
f6211ab187
Add various test cases (xfailed)
2012-10-15 12:00:32 -07:00
Tim Chevalier
e18c6bb3b6
Make moves explicit in aux test files
2012-10-12 20:43:37 -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
fe12da0864
De-mode comm::Chan
2012-10-04 16:48:57 -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
Graydon Hoare
fdd48dd903
Respect privacy qualifiers on view items, add to import resolutions.
2012-09-25 15:31:02 -07:00
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