Commit Graph

2413 Commits

Author SHA1 Message Date
Tim Chevalier
3f7b112b16 Update and un-xfail crate-method-reexport-grrrrrrr2
Closes #3155
2012-12-08 23:40:17 -08:00
Tim Chevalier
2c2398ca0d Xfail broken tests 2012-12-07 23:42:58 -08:00
Patrick Walton
833eb7ae1d test: Fix borrowck-preserve-box-in-pat. rs=bustage 2012-12-07 22:42:49 -08:00
Patrick Walton
374ccfee9a test: Fix borrowck-preserve-box-in-discr; more fallout from pattern bindings. rs=bustage 2012-12-07 22:00:55 -08:00
Patrick Walton
6338865741 test: Remove alt-implicit-copy.rs test. Incompatible with current borrow check semantics. rs=bustage 2012-12-07 21:59:38 -08:00
Patrick Walton
6157f1dc06 test: Fix some busted run-pass tests, fallout from the pattern bindings change. rs=bustage 2012-12-07 21:56:46 -08:00
Patrick Walton
184f5102b3 libsyntax: Fix parsing of module-qualified structure patterns. rs=bugfix 2012-12-07 19:10:16 -08:00
Patrick Walton
ab3b752906 librustc: Implement "&mut [T]" as an expression. r=brson 2012-12-07 18:29:10 -08:00
Brian Anderson
10c9d7921d Trait constraints are separated by space, not comma 2012-12-07 15:54:17 -08:00
Brian Anderson
2fcf562d16 Add an auto-slice-and-ref step to method lookup. Allows ~[T] to work with explicit self 2012-12-07 15:29:38 -08:00
Brian Anderson
e71081ec03 Merge pull request #4101 from brson/bound-default-methods
Call default methods on bound typarams more correctly
2012-12-07 15:10:57 -08:00
Tim Chevalier
35f36808ff Test cases, some xfailed 2012-12-06 21:53:14 -08:00
Tim Chevalier
31a4f40329 Remove compile-fail test from run-pass 2012-12-06 21:52:50 -08:00
Tim Chevalier
dd80f7e06e Xfail trait-inheritance-overloading-xc-exe
Issue #4135
2012-12-06 21:52:50 -08:00
Brian Anderson
ddfd1eaeb5 Use fuzzy_eq in run-pass/intrinsics-math.rs 2012-12-06 18:55:10 -08:00
Brian Anderson
098f71d348 xfail-fast static-fn-inline-xc. needs aux-build 2012-12-06 18:44:26 -08:00
Tim Chevalier
d2ad028a7c Rename std::ebml::Reader => std::ebml::reader, same for writer
Closes #4076
2012-12-06 16:14:54 -08:00
Tim Chevalier
fe9a339939 Add various test cases, mostly xfailed 2012-12-06 16:14:54 -08:00
Patrick Walton
219e260009 test: Fix some more run-pass bustage. rs=clownshoes 2012-12-06 09:28:42 -08:00
Patrick Walton
aa3aa3b1b2 librustc: Fix type_use to not treat i1* arguments as interchangeable with i8* arguments. Closes #3917. rs=bugfix 2012-12-05 20:23:14 -08:00
Brian Anderson
32ce61f947 Fix test 2012-12-05 20:14:40 -08:00
Brian Anderson
4f3cc01487 Fix cross-crate inlining of static functions 2012-12-05 18:09:52 -08:00
Patrick Walton
5bf9e6f58b test: Fix float imprecision error on intrinsics-math 2012-12-05 17:54:12 -08:00
Patrick Walton
674b638385 test: Fix alt-implicit-copy-unique. rs=me 2012-12-05 17:38:21 -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
3440482d8d test: Fix a bunch of test cases. rs=burning 2012-12-05 11:40:47 -08:00
Brian Anderson
01cd53baf0 Merge remote-tracking branch 'luqmana/incoming'
Conflicts:
	src/librustc/middle/typeck/check.rs
2012-12-04 18:49:50 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -08:00
Brian Anderson
05e51e6f7f Call default methods on bound typarams more correctly 2012-12-02 18:29:22 -08:00
Brian Anderson
c19c24d193 Fix tests for field parsing changes 2012-12-01 15:25:17 -08:00
Patrick Walton
1088006ed9 librustc: Implement unit-like struct constants. r=brson 2012-11-30 21:10:54 -08:00
Patrick Walton
8fa306a0ad librustc: Implement tuple struct constants. r=brson 2012-11-30 21:10:17 -08:00
Patrick Walton
5b5a0df7ee librustc: Implement C-like enum constants. r=tjc 2012-11-30 21:09:14 -08:00
Patrick Walton
54ae377ec2 librustc: Implement explicit @self and ~self for objects. r=nmatsakis 2012-11-30 19:39:01 -08:00
Patrick Walton
3afd6c3d79 librustc: Implement simple explicit self for objects. r=nmatsakis 2012-11-30 18:55:12 -08:00
Brian Anderson
3ed9fbd63c impls of traits cannot define methods on the anonymous trait 2012-11-29 22:07:49 -08:00
Brian Anderson
78ee821154 Implement trait inheritance for bounded type parameters 2012-11-29 18:10:11 -08:00
Brian Anderson
05e7ba8d39 Enable trait-inheritance-simple.rs 2012-11-29 18:10:11 -08:00
Tim Chevalier
f459acc45d Disallow importing private items
resolve wasn't checking that a `use` referred to a public item.

r=brson
2012-11-29 14:12:51 -08:00
Paul Stansifer
f6a8ffc625 Test statement macros. 2012-11-29 12:09:11 -08:00
Paul Stansifer
e7f07cb2a3 Update tests to respect the way that macros work now. 2012-11-29 12:09:11 -08:00
Patrick Walton
c946c87b6f libsyntax: Remove the "by-mutable-ref" obsolete syntax error; it blocks useful function argument patterns. Add a test for the latter. r=brson 2012-11-29 12:06:36 -08:00
Patrick Walton
3beff12309 test: Fix broken resource-cycle.rs. r=tinderbox 2012-11-29 12:05:56 -08:00
Patrick Walton
9678abedec test: Add a test that function argument patterns take in the expected type. r=test-only 2012-11-29 11:25:02 -08:00
Patrick Walton
976e1ced00 test: Add a test for generic objects. r=test-only 2012-11-29 11:18:36 -08:00
Patrick Walton
9e1c9be16f librustc: Make the Drop trait use explicit self 2012-11-29 11:06:15 -08:00
Luqman Aden
c6b1739232 Add more standard c lib llvm intrinsics. 2012-11-29 06:48:07 -05:00
Brian Anderson
16f72df704 Merge remote-tracking branch 'erickt/time'
Conflicts:
	src/libstd/time.rs
2012-11-28 14:49:58 -08:00
Patrick Walton
b9f9ab8f77 test: Implement a test for the Drop trait on a generic struct. a=test-only 2012-11-28 14:19:41 -08:00
Brian Anderson
fc06114ddf Merge remote-tracking branch 'brson/companion' into incoming
Conflicts:
	src/compiletest/compiletest.rs
	src/libcargo/cargo.rs
	src/libcore/core.rs
	src/librustc/rustc.rs
	src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Patrick Walton
430583c8b4 librustc: Allow &T to be assigned to *T. r=nmatsakis 2012-11-28 11:29:53 -08:00
Patrick Walton
61cfec3c52 librustc: Parse extern "C" { ... }. r=brson 2012-11-28 11:28:16 -08:00
Patrick Walton
ca6970a65e librustc: Make overloaded operators with explicit self translate correctly 2012-11-28 11:01:14 -08:00
Graydon Hoare
082a88e42c Merge pull request #4032 from catamorphism/getopts
[libstd] getopts, now with fewer copies
2012-11-28 08:47:25 -08:00
Patrick Walton
1c348e6e38 librustc: Implement @mut [T] as the new replacement for @[mut T] 2012-11-27 09:23:31 -08:00
Erick Tryzelaar
32763caa60 auto_serialize should use explicit refs (fixes #4044) 2012-11-26 22:31:48 -08:00
Jesse Jones
a18f0d413c Made Tm_ a struct instead of a record and added serialization support to Tm and Tm_.
Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.
2012-11-26 21:49:29 -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
Brian Anderson
be6613e048 Remove the crate language 2012-11-26 18:13:54 -08:00
Brian Anderson
58e26243a7 syntax: Add a hack to support the int-template pattern 2012-11-26 18:13:54 -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
Brian Anderson
3acf4a2a9c Fix test 2012-11-25 14:04:45 -08:00
Kevin Cantu
ff4075e553 Add improvements to insert_with_key
This commit adds a lower-level implementation of the generic
`insert_with_key` which I expect to be faster. Now insert could be
defined with insert_with_key, too, although I'm not sure we want to do that.

This also clarifies the tests a bit and adds an `insert_with` function.
2012-11-25 12:41:11 -08:00
Kevin Cantu
a343e435d5 Add an insert_with_key function to the Map trait 2012-11-25 12:41:11 -08:00
Tim Chevalier
fa66f3ec18 [tests] Add passing test
Closes #3683
2012-11-24 14:02:35 -08:00
Tim Chevalier
ec0c029a7e Split EBML module into a reader and a writer module
Minor refactoring, no review.

Closes #2739
2012-11-24 13:40:00 -08:00
Tim Chevalier
236fd32f0a [tests] Add test for #4033 2012-11-24 13:40:00 -08:00
Tim Chevalier
f74fe894fc [libstd] getopts, now with fewer copies
Change the opt_ functions in getopts to take a reference to a
Matches, instead of taking a Matches by-value, as suggested in
2012-11-24 12:52:27 -08:00
Niko Matsakis
117e5e3583 Implement LUB algorithm and add new unit-testing infrastructure for infer.
r=brson
2012-11-24 09:53:39 -05:00
Patrick Walton
e6d87a3ef4 libsyntax: Implement deriving correctly for type-parameterized structs and enums. r=brson 2012-11-21 10:27:37 -08:00
Patrick Walton
57588edf3b libsyntax: Implement deriving via a syntax extension for the IterBytes trait. r=brson 2012-11-21 10:27:34 -08:00
Patrick Walton
e0876fdfc1 libsyntax: Implement deriving for enums with N-ary variants. r=brson 2012-11-21 10:27:13 -08:00
Erick Tryzelaar
a27f5239bd libcore: Add stat methods to paths
Should we return the posix types, or should we just use i64s?
Should we expose platform specific stat fields?
2012-11-20 16:39:31 -08:00
Patrick Walton
a7aecc46a5 rustc: Implement "deriving" for monomorphic structs via a syntax extension. r=brson 2012-11-20 11:58:19 -08:00
Patrick Walton
318e534895 rustc: Implement explicit self for Eq and Ord. r=graydon 2012-11-19 15:33:11 -08:00
Brian Anderson
9bed0ddb0e Fix parsing of interpolated paths 2012-11-19 14:00:39 -08:00
Brian Anderson
72cc1aca17 Parse file mods from .rs files 2012-11-18 18:09:41 -08:00
Jesse Jones
68c852ad3a Made Map.contains_key, contains_key_ref, and get pure. 2012-11-18 13:25:24 -08:00
Tim Chevalier
f9ca0c89d8 Add xfailed test for #3979 2012-11-15 18:03:35 -08:00
Patrick Walton
64305174c9 librustc: Fix cross-crate reexports. rs=blocking-servo 2012-11-15 17:15:02 -08:00
Tim Chevalier
a0610c952f Add tests for #2190 (xfailed) 2012-11-15 12:35:14 -08:00
Patrick Walton
adc4bed773 librustc: Implement (and require) explicit self for derivable traits. r=nmatsakis 2012-11-15 10:26:49 -08:00
Patrick Walton
29e10c91fe librustc: Pass through extra parameters in automatically-derived methods. r=brson 2012-11-15 10:26:40 -08:00
Niko Matsakis
b7c04d152b Inherit mutability through fixed-length vectors.
Fixes #3226.  No review (one line bug fix).
2012-11-14 19:47:06 -08:00
Ben Striegel
f4a5a76aa4 Convert the test suite to use the Drop trait 2012-11-14 19:26:37 -08:00
Brian Anderson
8336cad95d Move two fn assignability tests from compile-fail to run-pass 2012-11-14 12:40:23 -08:00
Patrick Walton
32ad4ae4cd librustc: Require the #[derivable] attribute, remove the significance of "impl Foo : Bar;", and allow only a subset of methods in a trait to be derived. r=brson 2012-11-14 11:36:55 -08:00
Patrick Walton
3e14ada4f6 rustc: Implement let assignability. r=nmatsakis 2012-11-14 11:26:00 -08:00
Patrick Walton
bad62dcb04 rustc: Allow constants to be used in patterns. r=nmatsakis 2012-11-14 11:06:29 -08:00
Patrick Walton
db9f8db741 librustc: Implement deriving with a unit return type. r=tjc 2012-11-13 10:37:58 -08:00
Graydon Hoare
4e1ce014c8 cleanup: convert some remaining #foo invocations to foo! form. 2012-11-13 08:57:31 -08:00
Patrick Walton
2b93ab5a21 rustc: Make static methods not leak out of traits. r=brson 2012-11-12 22:11:22 -08:00
Patrick Walton
fe02814a63 rustc: Implement floating point literal inference. r=nmatsakis 2012-11-12 10:39:08 -08:00
Brian Anderson
3f816bdd57 xfail-fast run-pass/pub-use-xcrate 2012-11-08 19:02:25 -08:00
Brian Anderson
8643f757a2 rustc: Fix cross-crate reexports. #3908. r=pcwalton 2012-11-08 17:10:48 -08:00
Patrick Walton
0fc952372a rustc: Support irrefutable patterns in function arguments. r=nmatsakis 2012-11-07 19:29:30 -08:00
Patrick Walton
2904095570 rustc: Implement the Drop trait. r=brson 2012-11-07 12:34:32 -08:00
Graydon Hoare
92e3a8c17e rustc: reuse const vals, translate fn paths as consts. Close #2530. 2012-11-06 17:13:52 -08:00
Niko Matsakis
b0ed151539 Cleanup how we handle proto in types, remove unsound subtyping
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`.  They now result in compilation errors.

Fixes #2978.

Necessary first step for #2202, #2263.
2012-11-06 08:56:29 -08:00
Patrick Walton
449f4fbb07 rustc: Implement deriving involving generic bounded traits. r=brson 2012-11-05 13:38:45 -08:00
Brian Anderson
762101b72a syntax: Fold macros in default methods. Closes #3911 2012-11-02 23:11:36 -07: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
Patrick Walton
0c2e6fda73 rustc: Implement ~Trait. r=nmatsakis 2012-11-02 10:15:19 -07:00
Patrick Walton
65d4dbeb12 rustc: Implement dereference via unary '*' for structs. r=nmatsakis 2012-11-02 09:56:35 -07:00
Patrick Walton
4165edff22 rustc: Implement translation of pattern matching for tuple structs and unit-like structs. r=nmatsakis 2012-11-02 09:56:28 -07:00
Brian Anderson
3edccc311e Support #[cfg] on methods 2012-11-01 15:48:50 -07:00
Tim Chevalier
768247f393 Tests for #1896 2012-11-01 15:14:52 -07:00
Tim Chevalier
b269ac13cd Adding xfailed test for #3874 2012-11-01 15:14:52 -07:00
Patrick Walton
94f05c1936 rustc: Stop overwriting trait static method types when checking generic trait refs. Closes #3903. rs=blocking-burg 2012-11-01 15:10:41 -07:00
Tim Chevalier
3d8df9947f Add xfailed test cases 2012-11-01 14:43:26 -07:00
Tim Chevalier
9d276b11e5 Add test case for #3878, which didn't get merged somehow 2012-11-01 14:43:20 -07:00
Brian Anderson
740763fdef Merge remote-tracking branch 'vertexclique/incoming' 2012-10-31 16:11:23 -07:00
Tim Chevalier
4e5865f2ad Fix #1458 (allow paren'd exprs to be the operator in a do)
Closes #1458
2012-10-30 15:06:13 -07:00
Tim Chevalier
165ce14f68 Remove xfail-pretty from tests that pretty-print correctly now 2012-10-30 15:06:10 -07:00
Mahmut Bulut
1dc4d024a8 testcase added for #3878 2012-10-31 00:05:34 +02:00
Tim Chevalier
62f98c8ff8 Preserve parenthesization in the AST
Maintain explicit "paren" nodes in the AST so we can pretty-print
without having to guess where parens should go. We may revisit this
in the future.

r=graydon
2012-10-30 15:05:32 -07:00
Patrick Walton
a3b83c6224 rustc: Translate "deriving" for monomorphic intra-crate enums. r=brson 2012-10-30 11:40:44 -07:00
Patrick Walton
d5a27a0e0c rustc: Translate monomorphic intra-crate automatically-derived methods that follow the "eq" format 2012-10-26 18:23:45 -07:00
Patrick Walton
57cd6b3e3f rustc: Translate and check exhaustiveness of struct-like enum variant patterns. r=nmatsakis 2012-10-25 13:59:10 -07:00
Patrick Walton
599b4208fb rustc: Translate tuple struct constructors 2012-10-25 11:49:26 -07:00
Brian Anderson
b2d5acd6bc Merge remote-tracking branch 'brson/futures' 2012-10-24 20:29:01 -07:00
Niko Matsakis
8468c40fde Workaround #3850 2012-10-24 18:56:31 -07:00
Brian Anderson
3b6f5a18a2 Merge branch 'method-vis-parse'
Conflicts:
	src/libsyntax/parse/parser.rs
2012-10-24 12:15:21 -07:00
Mahmut Bulut
27fb3fe90d stage2 run-pass test for #3753 2012-10-24 18:32:36 +03:00
Patrick Walton
61bb3571a5 rustc: Implement construction of monomorphic struct-like variants. r=nmatsakis 2012-10-23 19:23:46 -07:00
Brian Anderson
3e4b2bd2b2 core: Use PortOne instead of Future in future_result 2012-10-23 14:21:15 -07:00
Tim Chevalier
11e92f37c1 Remove uses of binary move - <- - from tests and libraries 2012-10-23 12:10:03 -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
Brian Anderson
763a8e7b47 xfail-fast issue-3656 2012-10-22 14:04:22 -07:00
Tim Chevalier
dd66e7549b Preliminary support for labeled break/continue for loops
This patch adds preliminary middle-end support (liveness and trans)
for breaks and `loop`s to `loop` constructs that have labels.

while and for loops can't have labels yet.

Progress on #2216
2012-10-22 09:20:37 -07:00
Tim Chevalier
46d4bbbae4 Simplify the AST representation of ty param bounds
Change ast::ty_param_bound so that all ty param bounds are represented
as traits, with no special cases for Copy/Send/Owned/Const.
typeck::collect generates the special cases.

A consequence of this is that code using the #[no_core] attribute
can't use the Copy kind/trait. Probably not a big deal?

As a side effect, any user-defined traits that happen to be called
Copy, etc. in the same module override the built-in Copy trait.

r=nmatsakis

Closes #2284
2012-10-22 09:01:12 -07:00
Luqman Aden
e1db959ec2 rustc: add new intrinsics - atomic_cxchg{_acq,_rel} 2012-10-21 22:23:50 -04:00
Brian Anderson
8a8fbe3dce Remove remaining uses of old fixed-length vec syntax 2012-10-20 17:50:46 -07:00
Ben Striegel
ac81fff229 Remove old fixed-length vector syntax 2012-10-20 17:50:46 -07:00
Brian Anderson
15777de957 Fix run-pass/issue-2895 for 32-bit archs 2012-10-20 14:52:31 -07:00
Tim Chevalier
10612ee30c Remove superfluous by-ref in option::get, option::get_default, option::expect
Superficial change, no review.
2012-10-19 11:38:28 -07: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
7f12cc4e63 Merge pull request #3716 from Blei/fix-3656
rustc: fix size computation of structs for the FFI
2012-10-17 11:00:36 -07:00
Patrick Walton
4dc67c5e6a rustc: Implement intra-crate static methods on anonymous trait implementations. 2012-10-16 12:22:56 -07:00
Tim Chevalier
b38092e9a2 In ty::normalize_ty, don't replace self_regions with None
Instead, replace with re_static. This was causing ty::subst to
fail when called from trans::type_of::type_of.

Already discussed with nmatsakis and it's a small change, so
no review.

Closes #3447
2012-10-15 17:46:09 -07:00
Tim Chevalier
d29328617d Add test case for Issue 2895 2012-10-15 17:09:05 -07:00
Patrick Walton
91ae5412d8 rustc: Merge module and type namespaces. r=brson 2012-10-15 15:35:36 -07:00
Tim Chevalier
c5b82a65e9 Add test cases for #3668
Previous commits fix the issue.

Closes #3668
2012-10-15 14:41:09 -07:00
Tim Chevalier
4f9e7babeb Un-xfail test for #3521; it works now
Closes #3521
2012-10-15 14:18:15 -07:00
Patrick Walton
c886629d4f rustc: Implement monomorphic default methods. r=nmatsakis 2012-10-15 14:14:05 -07:00
Tim Chevalier
7237268b70 Allow enum discriminator exprs to refer to declared consts
Also some work towards #3521

Closes #2428
2012-10-15 12:28:29 -07:00
Tim Chevalier
f6211ab187 Add various test cases (xfailed) 2012-10-15 12:00:32 -07:00
Erick Tryzelaar
ab89b5c294 libstd: make Serializer a trait-level typaram 2012-10-15 08:25:23 -07:00
Tim Chevalier
3ebd878f4a Make moves explicit in rpass tests 2012-10-12 20:43:38 -07:00
Tim Chevalier
ea5e3d21ff Make moves explicit in doc examples
Had to remove the buffalo example. It was awkward to update for
explicit moves.
2012-10-12 20:43:37 -07:00
Niko Matsakis
cb55e246ba Use the Nth impl when translating a static method call, instead
of the 0th.  0th is only correct when there are no bound tps
on the trait.

Fixes #3741.
2012-10-12 17:46:43 -07:00
Graydon Hoare
57b4d10ff6 bump version to 0.5. 2012-10-12 16:41:32 -07:00
Kevin Cantu
1bede1f5e0 Replace several common macros of the form #m[...] with m!(...)
This commit replaces nearly all remaining uses of #fmt, #debug, #error,
and #info, and fixes some error messages...
2012-10-12 14:14:48 -07:00
Tim Chevalier
55b528484d Re-xfail two tests that I tried to resurrect (no time right now) 2012-10-11 17:59:33 -07:00
Tim Chevalier
2d116db578 Use move instead of ref in select-macro 2012-10-11 17:59:29 -07:00
Tim Chevalier
dd54431df6 Fix pipe-select-macro 2012-10-11 17:59:14 -07:00
Tim Chevalier
3c1ff31f4a Un-XFAIL task-compare 2012-10-11 17:03:56 -07:00
Tim Chevalier
5a849ea8ad Use match move in select-macro, get rid of a FIXME 2012-10-11 17:03:48 -07:00
Tim Chevalier
b24cba877d Un-XFAIL reflect-visit-type 2012-10-11 17:03:29 -07:00
Tim Chevalier
f1de001d69 Annotate FIXMEs in reflect-visit-data 2012-10-11 17:03:02 -07:00
Tim Chevalier
c090dcad84 Uncomment nested module in test, delete a FIXME 2012-10-11 17:02:38 -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
Philipp Brüschweiler
25096a212a rustc: fix size computation of structs for the FFI
It didn't take alignment into account.

Fixes #3656.
2012-10-10 22:40:58 +02:00
Erick Tryzelaar
eb626e7119 Remove the old serializers (needs snapshot) 2012-10-07 17:20:19 -07:00
Erick Tryzelaar
d301dd3686 remove the old auto_serialize syntax extension 2012-10-07 14:56:18 -07:00
Tim Chevalier
f96a2a2ca1 Remove by-mutable-ref mode from the compiler
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Patrick Walton
937f8f4067 test: XFAIL trait-inheritance-simple because of suspected 32-bit brokenness 2012-10-05 17:18:52 -07:00
Patrick Walton
04497ea7b9 rustc: Implement simple uses of &trait 2012-10-05 16:57:13 -07:00
Tim Chevalier
e16dbb7888 Demode some code using by-mutbl-ref; warn about by-mutbl-ref
The parser now warns about use of mutbl-ref mode, though it's kind
of a lie since this commit doesn't remove support for the mode.

Changed move_val_init to have stage0 and stage1/2 versions, the latter of
which is demoded.

Changed the type that the typechecker expects the move_val_init
intrinsic to have. After this is pushed, I can make a new snapshot,
which will remove the need for the stage0 versions.
2012-10-05 15:37:01 -07:00
Patrick Walton
1b732145ec rustc: Implement simple trait inheritance.
Generic trait inheritance, cross-crate trait inheritance, and vtable-based
trait inheritance don't work yet.
2012-10-05 11:52:08 -07:00
Tim Chevalier
fe12da0864 De-mode comm::Chan 2012-10-04 16:48:57 -07:00
Brian Anderson
edc317b821 Remove arg vectors from main functions. Stop supporting them. 2012-10-04 15:07:49 -07:00
Brian Anderson
83fdeddb91 xfail-pretty reexport-star 2012-10-03 22:10:52 -07:00
Patrick Walton
d936773e56 test: Add a test case for "pub use a::*" 2012-10-03 17:03:29 -07:00
Brian Anderson
72b7a7707f test: Use println instead of debug in hello.rs 2012-10-03 14:29:59 -07:00
Graydon Hoare
c31a88c7f4 De-export the submodules of task. Part of #3583. 2012-10-02 16:32:00 -07:00
Erick Tryzelaar
2569adc5ea Split auto_serialize2 into two macros 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
372c7de201 Add struct to auto_serialize2 test 2012-10-01 20:44:30 -07:00
Erick Tryzelaar
81423a3866 Add deserializable and more types to serialization2 2012-10-01 20:43:59 -07:00
Erick Tryzelaar
0a950f394d test: un-xfail the auto_serialize for boxes test 2012-10-01 20:43:59 -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
Tim Chevalier
a3a257cc3b Demode iter::foldl and friends 2012-09-28 17:57:02 -07:00
Tim Chevalier
fec96b2ae0 Demoding in iter: any, all, map_to_vec, flat_map_to_vec, filter_to_vec 2012-09-28 17:44:15 -07:00
Niko Matsakis
21519bc7e0 demode vec 2012-09-28 13:27:45 -07:00
Patrick Walton
7b0ed94bdc rustc: Make enum export visibility inherit properly 2012-09-27 17:43:09 -07:00
Brian Anderson
87a72567f0 Unbreak run-pass/issue-2904 more 2012-09-26 18:41:02 -07:00
Niko Matsakis
67a8e7128a Demode vec::push (and convert to method) 2012-09-26 18:02:07 -07:00
Brian Anderson
26a8fe3553 Fix test/run-pass/issue-2904 2012-09-26 17:03:02 -07:00
Erick Tryzelaar
49d00b2f22 libstd: port json over to serialization2 2012-09-26 16:29:41 -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
d2506a1787 test: Add a test for auto_serialize2 2012-09-26 16:20:24 -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
Tim Chevalier
e19e628b19 Demode iter-trait 2012-09-25 22:13:05 -07:00
Tim Chevalier
3023bd8729 Demode dvec 2012-09-25 18:27:55 -07:00
Brian Anderson
d05e2ad66c Demode core::result 2012-09-25 17:48:22 -07:00
Patrick Walton
954eee5310 test: Remove various box annihilator tests 2012-09-25 17:06:01 -07:00
Tim Chevalier
e85a3d8247 Demode Num trait and impls 2012-09-25 15:52:41 -07:00
Niko Matsakis
12a0401d84 Change method res to try autoref more often. Fixes #3585. 2012-09-25 15:22:38 -07:00
Niko Matsakis
267ab11cca use + mode for (almost) everything when not using legacy modes 2012-09-25 12:47:35 -07:00
Graydon Hoare
546f3dbbf5 Build the export_map2 from visibility markers, unless #[legacy_exports]; 2012-09-24 17:29:32 -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
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
3e9284d128 core: Demode sys 2012-09-20 15:37:55 -07:00
Patrick Walton
9117dcb968 rustc: De-mode all overloaded operators 2012-09-20 09:48:05 -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
afdd8204ea xfail-fast another legacy_mode test 2012-09-19 14:50:21 -07:00
Philipp Brüschweiler
d3e0a06578 V2: now with more locks! 2012-09-19 14:01:53 -07:00
Philipp Brüschweiler
68e755b1c2 core: Allocate threads on demand, not on scheduler startup
API change: rust_kernel::create_scheduler() or
rust_scheduler::rust_scheduler() respecitevly now take ownership of the
launch factory argument, it is needed to create new threads on demand.

Also renames rustrt::sched_threads() to rustrt::rust_sched_threads() for
consistency. Added rustrt::rust_max_sched_threads() to return the
maximal number of scheduled threads of the current scheduler.

Fixes #3493.
2012-09-19 14:01:53 -07:00
Brian Anderson
35a9353774 xfail-fast the legacy_mode run-pass tests 2012-09-19 13:59:58 -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
Brian Anderson
d53cfd225a core: Move Exclusive and SharedMutableState to the private mod 2012-09-18 15:23:57 -07:00
Erick Tryzelaar
d0d68c6036 libcore: make a copyless io::BytesWriter 2012-09-18 12:56:57 -07:00
Patrick Walton
c755449fd6 Revert "rustc: Change all non-keyword uses of "link""
This reverts commit 3b013cd800.
2012-09-18 11:47:04 -07:00
Patrick Walton
3b013cd800 rustc: Change all non-keyword uses of "link" 2012-09-18 11:27:37 -07:00
Niko Matsakis
2469cba0b1 Make auto-slice, auto-ptr not exclusive (fixes #3514) 2012-09-17 11:00:50 -07:00
Niko Matsakis
48496fc1b6 add a test and correct terminology
newtype'd enums have 1 variant, and 1 field.
denegerate have only 1 variant but may have more fields.
2012-09-17 06:34:36 -07:00
Niko Matsakis
4cad58c464 Fix broken assertion in regionck for code like (a[])() 2012-09-15 12:29:36 -07:00
Niko Matsakis
43924f1f9f fix some of the broken tests (the ones that were doing the right thing) 2012-09-13 15:05:30 -07:00
Niko Matsakis
0e584f2e74 Fix bug in auto-ref on bounded type parameters 2012-09-13 13:24:34 -07:00
Niko Matsakis
e0845eb589 repr: emit closing ) for enum variants, test that nullary variants names print 2012-09-13 11:10:05 -07:00
Niko Matsakis
34bf0b9e97 trans: overhaul match bindings. No more phi, one code path for guards.
Fixes #3256.
Fixes #3291.
2012-09-12 18:15:22 -07:00
Brian Anderson
ff54ac8e59 Rename vec::unsafe to vec::raw 2012-09-12 17:45:36 -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
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
ea01ee2e9e Convert 'use' to 'extern mod'. Remove old 'use' syntax 2012-09-11 19:25:43 -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
Patrick Walton
2aa67e9aa9 rustc: Stop calling cmp shape glue in trans.
XFAIL's alt-borrowed_str for now. Will need to fix this up in the future.
2012-09-10 17:26:17 -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
5eccf84919 Capitalize Copy trait in test 2012-09-10 15:24:42 -07:00
Niko Matsakis
04f1763409 Combine the vtable_origins from impl + method.
Not as clean as it could be, but fixes #3314.
2012-09-10 12:59:17 -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
Tim Chevalier
9a15c50f6c Uppercase Send bound and make test for #2834 work 2012-09-10 12:38:52 -07:00
Brian Anderson
ef9aa80438 Promote most restricted keywords to strict keywords 2012-09-10 12:07:19 -07:00