Patrick Walton
3eda11a4f7
test: Remove pure
from the test suite
2013-03-22 12:57:28 -07:00
Patrick Walton
4634f7edae
librustc: Remove all uses of static
from functions. rs=destatic
2013-03-22 10:27:39 -07:00
bors
d52408d46a
auto merge of #5480 : pcwalton/rust/at-const, r=pcwalton
...
r? @catamorphism
2013-03-21 20:39:51 -07:00
Patrick Walton
d4fee24c7c
librustc: Forbid destructors from being attached to any structs that might contain non-Owned fields. r=nmatsakis
2013-03-21 17:31:34 -07:00
bors
6aa612a909
auto merge of #5461 : catamorphism/rust/flagless, r=nikomatsakis
...
r? @nikomatsakis The typechecker previously passed around a boolean return flag to
indicate whether it saw something with type _|_ (that is, something
it knows at compile-time will definitely diverge) and also had some
manual checks for the `ty_err` pseudo-type that represents a previous
type error. This was because the typing rules implemented by the
typechecker didn't properly propagate _|_ and ty_err. I fixed it.
This also required changing expected error messages in a few tests,
as now we're printing out fewer derived errors -- in fact, at this
point we should print out no derived errors, so report any that
you see (ones that include "[type error]") as bugs.
2013-03-21 11:46:00 -07:00
Patrick Walton
5726fd4526
librustc: Forbid access to cross-crate private static methods
2013-03-21 09:47:17 -07:00
Tim Chevalier
db00362313
Make typechecker compositional
...
The typechecker previously passed around a boolean return flag to
indicate whether it saw something with type _|_ (that is, something
it knows at compile-time will definitely diverge) and also had some
manual checks for the `ty_err` pseudo-type that represents a previous
type error. This was because the typing rules implemented by the
typechecker didn't properly propagate _|_ and ty_err. I fixed it.
This also required changing expected error messages in a few tests,
as now we're printing out fewer derived errors -- in fact, at this
point we should print out no derived errors, so report any that
you see (ones that include "[type error]") as bugs.
2013-03-20 19:44:38 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Patrick Walton
58f248d923
test: Fix tests. rs=tests
2013-03-13 20:08:35 -07:00
Patrick Walton
ac60d53c65
test: Some test fixes
2013-03-13 20:07:11 -07:00
Patrick Walton
8fa66e8e07
librustc: Remove implicit self from the language, except for old-style drop blocks.
2013-03-13 20:07:10 -07:00
Patrick Walton
b1c699815d
librustc: Don't accept as Trait
anymore; fix all occurrences of it.
2013-03-13 20:07:09 -07:00
Niko Matsakis
852619d5d7
Remove ++
mode from the compiler (it is parsed as +
mode)
...
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13 17:00:09 -04:00
Patrick Walton
1274d4a006
test: Fix tests. rs=tests
2013-03-11 09:36:00 -07:00
Patrick Walton
e48446d060
test: Remove newtype enums from the test suite. rs=deenum
2013-03-11 09:35:58 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Alex Crichton
2c87920f52
test: Removing dvec uses
2013-03-08 09:54:41 -05:00
Patrick Walton
6b5d1afeec
librustc: Remove "extern mod { ... }" from librustc, librustdoc, and tests. rs=deexterning
2013-03-07 22:32:52 -08:00
Josh Matthews
7bb03345cf
Inline constants across crates.
2013-03-07 15:34:52 -05:00
Niko Matsakis
6267339d68
Fix bug in coherence that causes all cross-crate impls to be regarded as
...
inherent impls, not just those of the `impl Type` variety.
2013-03-06 11:02:19 -05:00
Patrick Walton
6d4ed5283c
libsyntax: Separate multiple inherited traits with +
2013-03-05 10:18:35 -08:00
Patrick Walton
30bb09c0e7
test: Remove fn@
, fn~
, and fn&
from the test suite. rs=defun
2013-03-02 18:47:47 -08:00
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