Tim Chevalier
86db69def2
Revert "xfail broken tests"
...
This reverts commit d771830c4c
.
2013-01-07 18:04:30 -08:00
Tim Chevalier
d771830c4c
xfail broken tests
2013-01-07 18:04:01 -08:00
Tim Chevalier
9e2a59dc5d
Add xfailed test for #3707
2013-01-03 15:35:19 -08:00
Tim Chevalier
7b08ed02bb
Actually xfail this, unbreak build
2013-01-03 15:26:41 -08:00
Tim Chevalier
1330b1cdf5
Add test cases (one xfailed, one not)
...
as per #3601 and #3609
2013-01-03 14:55:51 -08:00
Patrick Walton
5bd8692e9d
test: Fix a bunch of compile-fail tests. rs=bustage
2012-12-28 19:36:35 -08:00
Tim Chevalier
65839fa622
Emit a type error for integer literals where the expected type is char
...
For example, in let x: char = 42; This was an ICE and is now a
proper type error, as per #3477
2012-12-22 15:58:05 -08:00
Brian Anderson
d062896a8b
Deal with test failures in various ways
2012-12-18 14:35:53 -08:00
Erick Tryzelaar
3fc74df7a4
fix warnings in vec destructuring tests
2012-12-17 22:01:38 -08:00
Jakub Wieczorek
6c83fe4c24
Add more tests
2012-12-17 16:50:40 -08:00
Jakub Wieczorek
1968cb315a
Add support for destructuring vectors in match expressions
2012-12-17 16:50:40 -08:00
Patrick Walton
ebd9ad4d04
librustc: Add a lint mode for deprecated self. r=brson
2012-12-14 19:46:55 -08:00
Patrick Walton
8a9ccf81b0
librustc: Implement a lint mode for default methods. r=brson
2012-12-14 19:28:43 -08:00
Patrick Walton
99fa9c3cab
Revert "librustc: Implement a lint mode for default methods"
...
This reverts commit 53b181dd47
.
2012-12-14 19:13:59 -08:00
Patrick Walton
53b181dd47
librustc: Implement a lint mode for default methods
2012-12-14 19:07:20 -08:00
Patrick Walton
bdb2d659ae
librustc: Ensure that no moves from the inside of @ or & boxes occur. rs=crashing-servo
2012-12-14 18:19:07 -08:00
Brian Anderson
0afe002757
Fix broken test
2012-12-14 15:38:53 -08:00
Brian Anderson
e6d1b02359
Rename core::comm to core::oldcomm
2012-12-14 14:59:32 -08:00
Patrick Walton
1b9f740f2f
librustc: Reset the mode context to MoveValue for block lambdas. rs=bugfix
2012-12-13 21:44:19 -08:00
Brian Anderson
b07a78b7cb
Fix broken tests
2012-12-13 19:06:27 -08:00
Brian Anderson
ed4fac01b5
Rename Send trait to Owned
2012-12-13 15:52:50 -08:00
Brian Anderson
a277081ee4
Rename Owned trait to Durable
2012-12-13 15:52:50 -08:00
Patrick Walton
cd120736cb
librustc: Allow moves out of self
. r=nmatsakis
2012-12-13 15:49:07 -08:00
Patrick Walton
45848b2040
librustc: Automatically move non-implicitly-copyable types into unique closures. r=nmatsakis
2012-12-13 15:33:33 -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
9a4c669867
syntax: remove remaining #syntaxext machinery. Close #3516 .
2012-12-12 17:08:09 -08:00
Graydon Hoare
e24ae85025
syntax: remove most code handling old-style syntax extensions.
2012-12-12 15:02:47 -08:00
Graydon Hoare
9cced55b93
syntax: remove all remaining uses of #ast, and #ast / qquote itself.
2012-12-12 15:02:47 -08:00
Tim Chevalier
38bd694df1
Reverse the order of the results of pipes::stream
...
As per #3637 .
2012-12-11 19:23:28 -08:00
Tim Chevalier
d42bdf1997
Auto-deref when checking field and method privacy
...
This disallows using pointers to sneak around priv qualifiers.
Deeming this too small for review as well. Closes #3763
2012-12-11 19:17:31 -08:00
Brian Anderson
a7159be24a
Remove old deriving
2012-12-11 18:11:14 -08:00
Tim Chevalier
6439f2d546
Avoid extra error for type mismatches in patterns
...
When a type error has already occurred, don't call ty::subst,
which may ICE due to the mismatch in the number of type params
involved.
I'm deeming this too small to review.
Closes #3680
2012-12-11 17:38:57 -08:00
Tim Chevalier
94a76843f4
Revert "Merge pull request #4144 from luqmana/deprecated-attribute"
...
This reverts commit f675b97ddc
, reversing
changes made to e7dd3af970
.
2012-12-11 12:28:30 -08:00
Tim Chevalier
f675b97ddc
Merge pull request #4144 from luqmana/deprecated-attribute
...
Add deprecated attribute.
2012-12-10 21:16:20 -08:00
Brian Anderson
3fcdb7d6a7
Adjust the die macro to only accept ~str and to work in statement position
2012-12-10 18:16:22 -08:00
Graydon Hoare
d1affff623
Reliciense makefiles and testsuite. Yup.
2012-12-10 17:32:58 -08:00
Luqman Aden
a0d7b96170
Add test case for deprecated attribute.
2012-12-09 03:20:35 -05:00
Tim Chevalier
a7f29b3498
Fix busted test case
...
My last commit made more type errors recoverable, so extra errors
that were getting suppressed before were unleashed.
2012-12-08 23:51:51 -08:00
Tim Chevalier
42f8a3366a
Print out a more helpful type error message for do-blocks/for-loops
...
If a do-block body has the wrong type, or a for-loop body has a
non-() type, suggest that the user might have meant the other one.
Closes #2817
r=brson
2012-12-08 23:04:38 -08:00
Tim Chevalier
13c7b97248
Add test for #2995
2012-12-07 21:40:42 -08:00
Tim Chevalier
8255aa1ec9
Add test case for #2828
2012-12-07 21:29:49 -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
Tim Chevalier
35f36808ff
Test cases, some xfailed
2012-12-06 21:53:14 -08:00
Tim Chevalier
fe9a339939
Add various test cases, mostly xfailed
2012-12-06 16:14:54 -08:00
Patrick Walton
14a7be31bb
test: Fix busted test. rs=bustage
2012-12-06 14:54:01 -08:00
Patrick Walton
e6ab0ca8b1
test: Fix more compile-fail bustage. rs=bustage
2012-12-06 12:13:30 -08:00
Patrick Walton
45052e13a5
test: Fix some compile-fail bustage. rs=bustage
2012-12-06 11:08:23 -08:00
Patrick Walton
7203be1109
librustc: Fix handling of ~
and @
unary operators in mode computation. Closes #4114 . rs=bugfix
2012-12-05 22:57:58 -08:00
Patrick Walton
33c1e47c1b
librustc: Implement moves based on type. r=nmatsakis
2012-12-04 15:38:04 -08:00
Brian Anderson
83a55ea73a
Fix some compile-fail tests
2012-12-01 15:59: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
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
Patrick Walton
2a6c6348b7
test: Remove obsolete tests. rs=buildbot
2012-11-29 15:12:06 -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
15e03e1e5e
Forbid attrs on macros, since we don't handle them properly yet.
2012-11-29 12:09:11 -08:00
Patrick Walton
9e1c9be16f
librustc: Make the Drop trait use explicit self
2012-11-29 11:06:15 -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
1c348e6e38
librustc: Implement @mut [T] as the new replacement for @[mut T]
2012-11-27 09:23:31 -08:00
Brian Anderson
be6613e048
Remove the crate language
2012-11-26 18:13:54 -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
Tim Chevalier
ef833d4101
Introduce a T_err type for type errors
...
This allows more errors to be non-fatal, as per #1871 .
I only went through and started changing span_fatal to span_err in
check.rs. There are probably more errors that could be made
non-fatal. So if you see derived type errors appearing from now on,
file a bug!
r=graydon
Closes #1871
2012-11-21 12:44:51 -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
74b2e99797
Report errors better when failing to open files for sub-parsers
2012-11-18 18:09:41 -08:00
Brian Anderson
72cc1aca17
Parse file mods from .rs files
2012-11-18 18:09:41 -08:00
Tim Chevalier
b9b21b2614
Update test and un-xfail it
2012-11-15 19:36:48 -08:00
Tim Chevalier
9d6ab9ae23
Update error message and un-xfail test
2012-11-15 19:36:48 -08:00
Tim Chevalier
39c306eeef
Un-xfail working tests
2012-11-15 19:36:44 -08:00
Tim Chevalier
2fd2a56063
Update error message and un-xfail test
2012-11-15 18:41:17 -08:00
Tim Chevalier
f8bd95589f
Add comments explaining why these tests are xfailed
2012-11-15 18:41:17 -08:00
Tim Chevalier
d4cc7db138
Un-xfail working test
2012-11-15 18:41:17 -08:00
Tim Chevalier
2f83baf857
Check for duplicate supertraits and forbid them
...
As per #3953
2012-11-15 18:41:17 -08:00
Tim Chevalier
82017b8416
Make staticness mismatch a fatal error
...
Exit with a fatal error, instead of recording a non-fatal error,
when we encounter an impl method that's static when its corresponding
trait method isn't (or vice versa). This is because code later on in
the typechecker will expect the staticness of the two methods to be
consistent and ICE otherwise.
r=nmatsakis
Closes #3969
2012-11-15 18:14:13 -08:00
Tim Chevalier
cb355bf7ad
Update error message and un-xfail test
2012-11-15 17:14:28 -08:00
Tim Chevalier
fb47e41411
Un-xfail working tests
2012-11-15 16:59:07 -08:00
Tim Chevalier
6b65aed350
Remove test that tested behavior of unchecked blocks
...
We don't have unchecked blocks anymore.
2012-11-15 16:59:07 -08:00
Tim Chevalier
d58e0e30ed
Update error messages and un-xfail
2012-11-15 16:59:07 -08:00
Tim Chevalier
35b2960d00
Add another test for #3177
2012-11-15 16:59:07 -08:00
Tim Chevalier
1f81e4cbc6
Remove typestate test
2012-11-15 16:59:07 -08:00
Patrick Walton
adc4bed773
librustc: Implement (and require) explicit self for derivable traits. r=nmatsakis
2012-11-15 10:26:49 -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
Brian Anderson
f14240b1c8
Remove obsolete const pattern test
2012-11-14 11:43:28 -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
Brian Anderson
cf002e9d32
Tools should not be build prereqs of tests. Closes #3946
2012-11-13 18:35:02 -08:00
Graydon Hoare
4e1ce014c8
cleanup: convert some remaining #foo invocations to foo! form.
2012-11-13 08:57:31 -08:00
Patrick Walton
fe02814a63
rustc: Implement floating point literal inference. r=nmatsakis
2012-11-12 10:39:08 -08:00
Brian Anderson
f05e2da709
Add a test for multiple main functions
2012-11-09 12:13:55 -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
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
be93b29d30
rustc: Implement parsing and typechecking for "once fn"
2012-11-05 13:17:02 -08:00
Patrick Walton
caf68038dd
test: Fix error messages in compile-fail tests. rs=rustbot
2012-11-02 10:43:28 -07:00
Patrick Walton
0c2e6fda73
rustc: Implement ~Trait. r=nmatsakis
2012-11-02 10:15:19 -07:00
Patrick Walton
106f9976ab
rustc: Implement typechecking, exhaustiveness checking, and borrow checking for pattern matching of tuple structs. r=nmatsakis
...
Conflicts:
src/rustc/middle/typeck/check/alt.rs
2012-11-02 09:56:09 -07:00
Tim Chevalier
768247f393
Tests for #1896
2012-11-01 15:14:52 -07:00
Brian Anderson
cb4de738cf
Fix checking of duplicate and missing struct field initializers. Closes #3486 . Closes #3892
2012-10-31 13:56:41 -07:00
Tim Chevalier
165ce14f68
Remove xfail-pretty from tests that pretty-print correctly now
2012-10-30 15:06:10 -07: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