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
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
bors
695e9fd13c
auto merge of #5293 : brson/rust/logging, r=brson
...
r? @graydon
This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros.
After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later.
I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
2013-03-13 10:40:07 -07:00
Andrew Paseltiner
24efea7208
syntax: implement #[deriving] meta-attribute
2013-03-12 12:52:39 -04:00
Brian Anderson
82f190355b
Remove uses of log
2013-03-11 23:19:42 -07:00
Patrick Walton
08c840205e
librustc: Lint the old drop
destructor notation off
2013-03-11 09:36:00 -07: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
Seo Sanghyeon
9e85589ad3
Implement vector destructuring from tail
2013-03-11 19:01:51 +09:00
Niko Matsakis
7cbd4b20ee
Remove @ast::Region and replace with @ast::Lifetime.
...
Modify pretty-printer to emit lifetimes and fix a few minor
parser bugs that this uncovered.
2013-03-09 19:43:59 -05:00
Alex Crichton
2c87920f52
test: Removing dvec uses
2013-03-08 09:54:41 -05:00
Patrick Walton
d661711cc2
test: Fix tests.
2013-03-07 22:37:58 -08:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08: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
50277ec555
Permit casting region pointers to unsafe ones.
2013-03-07 14:48:28 -05:00
Niko Matsakis
078fd23a07
fix test to not use fn expr
2013-03-06 16:19:21 -05:00
Niko Matsakis
3280e5a33d
Improve error messages when illegal lifetimes are used
2013-03-06 15:12:58 -05:00
Niko Matsakis
3168fe06ff
Add manual &self/ and &static/ and /&self declarations that
...
are currently inferred. New rules are coming that will require
them to be explicit. All add some explicit self declarations.
2013-03-06 15:12:57 -05:00
Niko Matsakis
6d764cc361
Make object types not implement associated trait. Fixes #5087 .
2013-03-06 11:02:19 -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
bors
dec599f652
auto merge of #5234 : pcwalton/rust/equiv, r=pcwalton
...
r? @nikomatsakis
2013-03-05 12:12:50 -08:00
Patrick Walton
6d4ed5283c
libsyntax: Separate multiple inherited traits with +
2013-03-05 10:18:35 -08:00
bors
e94465c053
auto merge of #5231 : jbclements/rust/better-macro-error-message, r=graydon
...
Macro invocations with path separators (e.g. foo::bar!()) now produce a sensible error message, rather than an assertion failure. Also added compile-fail test case.
Fixes #5218 ?
2013-03-05 10:06:50 -08:00
Niko Matsakis
cbfd88a486
Update region inference for traits so that a method with
...
explicit self doesn't incorrectly cause the entire trait to
be tagged as being region-parameterized.
Fixes #5224 .
2013-03-05 08:46:23 -05:00
John Clements
fe08364b3b
added test case for macros with separators error message
2013-03-04 17:41:38 -08:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05: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
bors
5aca7d6aef
auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakis
...
The fix is straight-forward, but there are several changes
while fixing the issue.
1) disallow `mut` keyword when making a new struct
In code base, there are following code,
```rust
struct Foo { mut a: int };
let a = Foo { mut a: 1 };
```
This is because of structural record, which is
deprecated corrently (see issue #3089 ) In structural
record, `mut` keyword should be allowd to control
mutability. But without structural record, we don't
need to allow `mut` keyword while constructing struct.
2) disallow structural records in parser level
This is related to 1). With structural records, there
is an ambiguity between empty block and empty struct
To solve the problem, I change parser to stop parsing
structural records. I think this is not a problem,
because structural records are not compiled already.
Misc. issues
There is an ambiguity between empty struct vs. empty match stmt.
with following code,
```rust
match x{} {}
```
Two interpretation is possible, which is listed blow
```rust
match (x{}) {} // matching with newly-constructed empty struct
(match x{}) {} // matching with empty enum(or struct) x
// and then empty block
```
It seems that there is no such code in rust code base, but
there is one test which uses empty match statement:
https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs
All other cases could be distinguished with look-ahead,
but this can't be. One possible solution is wrapping with
parentheses when matching with an uninhabited type.
```rust
enum what { }
fn match_with_empty(x: what) -> ~str {
match (x) { //use parentheses to remove the ambiguity
}
}
```
2013-03-02 04:21:38 -08:00
Jihyun Yu
95bc9ea26d
Remove REC, change related tests/docs
2013-03-02 12:57:05 +09:00
Brian Anderson
bcf626812b
Rename core::private to core::unstable. #4743
2013-03-01 14:55:47 -08:00
Niko Matsakis
4ecb672d7f
Remove legacy object creation mode, and convert remaining uses of it
2013-02-28 20:28:04 -05:00
Alex Crichton
f2837fa3f5
Fix leaking immediate children and types via glob imports
2013-02-28 17:59:56 -05:00
Alex Crichton
94a07b6e4a
Fix leaking non-public 'use' statements with glob imports
2013-02-28 17:59:56 -05:00
Patrick Walton
2859c1ac6d
librustc: Enforce cross-crate method privacy
2013-02-28 11:32:26 -08:00
Patrick Walton
09a2b4e599
librustc: Make methods private if the impl is private
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
bors
c705440ee3
auto merge of #5155 : bstrie/rust/dedrop, r=pcwalton
...
This removes all but 6 uses of `drop {}` from the entire codebase. Removing any of the remaining uses causes various non-trivial bugs; I'll start reporting them once this gets merged.
2013-02-27 23:30:40 -08:00
Ben Striegel
43d43adf6b
Turn old drop
blocks into Drop
traits
2013-02-27 19:14:19 -05:00
Tim Chevalier
dbbdca31b4
testsuite: Update and un-xfail #3601 test
2013-02-27 14:33:19 -08:00
bors
5fc0eccdfa
auto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis
...
It is reversed that type of arm pattern and type of search pattern
in error message.
2013-02-27 12:21:49 -08:00
Jeong YunWon
35baf5b202
Fix reversed current/expected type
...
Fix some reversed type of arm pattern and type of search pattern
in error message.
2013-02-28 03:31:22 +09:00
Patrick Walton
07c3f5c0de
librustc: Forbid pub
or priv
before trait implementations
2013-02-27 09:40:16 -08:00
Patrick Walton
8d7e6ef772
libsyntax: Forbid ~mut
and ~const
. rs=demuting
2013-02-27 09:40:15 -08:00
bors
061a223723
auto merge of #5118 : youknowone/rust/match-guard, r=nikomatsakis
...
Fix ICE while there is no remained arms after checking guards.
This fix #3601 also.
2013-02-27 06:06:44 -08:00
Luqman Aden
a0866d0166
Adjust error messages for compile-fail tests.
2013-02-26 17:23:30 -08:00
Alex Crichton
681e6dd40d
Fix using the #[]-style attribute for unused imports
2013-02-26 17:51:26 -05:00
Alex Crichton
7e08d8f23c
Don't warn about 'pub use' statements
2013-02-26 17:51:26 -05:00
Jeong YunWon
b79c4dc262
Add non-exhaustive check for match guards
...
Fix ICE while there is no remained arms after checking guards
2013-02-26 22:20:02 +09:00
Patrick Walton
8fceee6c88
test: De-[mut] (remove all mutable arrays from) the tests. rs=demuting
2013-02-26 04:18:12 -08:00
Patrick Walton
e3d43e490b
test: De-~mut the test suite. rs=demuting
2013-02-26 04:18:12 -08:00
bors
580df4d997
auto merge of #5084 : oncemoreification/rust/issue-4517, r=brson
...
Patch for #4517
This works for fixed vectors, but I am unclear how slices should be printed, simply '&[...]' or...
e.i. How should regions be printed?
2013-02-25 17:36:40 -08:00
Jeong YunWon
f0d0b5c116
Report error for non constant vector repeat count
...
Fix issue #3645
2013-02-25 00:21:03 +09:00
oncemoreification
c4ef822dc7
Fix slice printing
2013-02-23 21:46:36 -08:00
Patrick Walton
82062a6348
test: De-mut the test suite. rs=demuting
2013-02-22 18:35:01 -08:00
bors
c316189d15
auto merge of #5081 : brson/rust/pipes, r=pcwalton
...
r?
2013-02-22 11:24:38 -08:00
oncemoreification
4ffff6697b
Fix vector syntax in error messages
2013-02-22 02:19:41 -08:00
Brian Anderson
dab6a85230
core: Extract comm from pipes. #4742
2013-02-21 17:36:54 -08:00
Luqman Aden
9ea6a49696
Remove the last bits of structural records from tests/rustc/rusti/rustpkg.
2013-02-21 15:19:40 -08:00
Patrick Walton
bf2a225c0b
librustc: Separate most trait bounds with '+'. rs=plussing
2013-02-20 21:14:20 -08:00
bors
62f2b4943a
auto merge of #5046 : sanxiyn/rust/struct-match, r=catamorphism
...
Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.
Fix #4849 .
2013-02-20 16:08:36 -08:00
Seo Sanghyeon
a29023e9b2
Check type when struct is matched against enum-like pattern
...
Previously check always succeeded because struct type was derived from
the matched expression, not the matched pattern.
2013-02-20 02:44:02 +09:00
Kang Seonghoon
f513c567cb
fix ICE after incorrect number of args in calls
2013-02-20 00:53:54 +09:00
Jeong YunWon
092b6114c1
add missing typecheck for const pattern match arm
...
Issue #4968
2013-02-19 00:56:02 +09:00
Seth Pink
60bd4a5385
Removed more capture claueses.
2013-02-17 12:41:45 +10:00
Niko Matsakis
6c728e32c0
Parse (and discard) lifetime declarations on function types
2013-02-16 08:03:58 -05:00
Niko Matsakis
c7f85003a3
Permit lifetimes to appear in type parameter lists and after &
. Lifetimes in
...
type parameter lists are currently ignored, but `&'a T` is equivalent to
`&a/T`.
2013-02-16 08:01:10 -05: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
Luqman Aden
cc89029942
libcore: Remove ptr::mut_addr_of since &mut is coerced to *mut
2013-02-14 18:36:10 -08:00
bors
3c07d037cd
auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
...
review? @brson
Issue #4524
2013-02-14 15:37:48 -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
4699ac67c6
Remove all final references to die!
2013-02-14 13:09:09 -08:00
Patrick Walton
216e85fadf
libcore: Move the numeric operations out of Num. r=brson
...
Sadly I could not use trait inheritance due to a type parameter substitution
bug.
2013-02-14 08:14:01 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
Ben Striegel
e6c82c0375
RIMOV core::vec
...
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Niko Matsakis
ab2534974c
Adjust borrow checker algorithm to address #4856 unsoundness,
...
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-12 20:10:50 -08:00
bors
9d7014e55c
auto merge of #4861 : sethpink/rust/incoming, r=catamorphism
...
Fix for issue #4830 .
2013-02-09 18:37:02 -08:00
Seth Pink
8ebdb3d0ab
Issue #4830 fix
2013-02-09 23:00:55 +10:00
Niko Matsakis
a380df809c
Fix subtle error in caching during kind computation that could cause linear
...
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
2013-02-08 07:20:39 -08:00
bors
2bc9655bc1
auto merge of #4803 : alexcrichton/rust/fix-unused-imports, r=graydon
...
The first commit message has most of the comments, but this pull request basically fixes a lot of issues surrounding the `unused_imports` warning/deny attribute.
Before this patch there were these problems:
1. Unused imports from `prelude.rs` were warned about with dummy spans, leading to a large number of confusing warnings.
2. Unused imports from `intrinsic.rs` were warned about with the file `<intrinsic>` which couldn't be forced to go away
3. Methods used from imported traites (like `io::WriterUtil`) resulted in an unused warning of the import even though it was used.
4. If one `use` statement imported N modules, M of which weren't used, M warning statements were issued.
5. If a glob import statement was used, each public export of the target module which wasn't used had a warning issued.
This patch deals with all these cases by doing:
1. Ignore unused imports from `prelude.rs` (indicated by a dummy span of 0)
2. Ignore unused imports from `intrinsic.rs` (test on the imported module name, is there a better way?)
3. Track when imported modules are used as candidates for methods, and just assume they're used. This may not end up being the actual case, but in theory not warning about an unused thing is worse than warning about a used thing.
4. Only issue one warning statement
5. Only issue one warning statement.
This is the first time I've edited the compiler itself, and I tried to keep up with the style around, but I may have missed something here or there...
2013-02-07 15:20:16 -08:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
bors
d9a61f2a19
auto merge of #4816 : lifthrasiir/rust/float-literal, r=graydon
...
See #4804 for details.
2013-02-07 00:14:14 -08:00
Kang Seonghoon
2600bcc05d
got rid of last empty lines
2013-02-06 17:43:14 +09:00
Kang Seonghoon
01cc9ecafe
libsyntax: no binary/hex float literals
2013-02-06 16:49:24 +09:00
Tim Chevalier
fd7b732e58
testsuite: Add test for #4523
2013-02-05 17:30:35 -08:00
Alex Crichton
b368cb2341
Don't warn when imported traits are indeed used
2013-02-05 12:41:19 -05:00
Alex Crichton
6a4483ec7a
Fix some bugs with -W unused-imports
...
1. Don't warn about anything not used in the prelude which is autmoatically
injected, accomplished with a test that the span is equal to a dummy span.
2. Don't warn about unused imports from the injected intrinsic module,
accomplished by testing against the name of the imported module
3. If anything is used from a glob import, don't warn about the glob import.
4. If an import imports more than one thing, and none of them are used, only
issue a warning once
Also updated the unused-imports-warn test to have stricter requirements on
error messages.
2013-02-05 12:40:59 -05:00
bors
52817092a9
auto merge of #4747 : sanxiyn/rust/integral-type, r=graydon
...
`ty::type_is_integral` returns `true` for `ty_bool`. This causes `-true` to compile, instead of resulting in a type error.
2013-02-04 19:59:06 -08:00
Seo Sanghyeon
6d5428cb4e
Let type_is_integral return false for bool type
2013-02-04 23:01:47 +09:00
Erick Tryzelaar
9adfa59d8e
core: convert ToStr::to_str to take explicit &self
2013-02-03 20:47:26 -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
Daniel Micay
0a75aefad0
update compile-fail/map-types.rs to use hashmap
2013-02-03 15:55:09 -05:00
Nick Desaulniers
7868b6bf55
Remove fail keyword from lexer & parser and clean up remaining calls to
...
fail
Fix merge conflicts - Issue 4524
2013-02-01 00:15:42 -08: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
Niko Matsakis
0682ad0eb9
Finalize moves-based-on-type implementation.
...
Changes:
- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
(though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
(see details below)
Future work (I'll open bugs for these...):
- Improve error messages for moves that are due
to bindings
- Add support for moving owned content like a.b.c
to borrow check, test in trans (but I think it'll
"just work")
- Proper fix for def-ids in params
Def ids in params:
Move captures into a map instead of recomputing.
This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining. I am
not sure of my preferred fix for the larger bug yet. This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00
Patrick Walton
366812a5c3
librustc: Change self
as a type to Self
everywhere. r=brson
2013-01-30 19:52:45 -08:00
Graydon Hoare
040035cd08
test: fix compile-fail tests somehow missed from local 'make check', r=burningtree.
2013-01-30 17:07:35 -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
Patrick Walton
226cd68f13
librustc: De-implicit-self the visitor. r=graydon
2013-01-29 10:43:12 -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
58ec84a098
testsuite: Remove structural records from remaining compile-fail tests
2013-01-28 19:41:56 -08:00
Niko Matsakis
2b67d88809
Rewrite the coercion code to be more readable, more sound, and to reborrow when
...
needed.
Regarding soundness: there was a subtle bug in how it was done before; see the
compile-fail test for an example.
Regarding reborrowing: reborrowing allows mut and const
slices/borrowed-pointers to be used with pure fns that expect immutable data.
r=brson
2013-01-28 10:01:59 -08:00
Niko Matsakis
2e10ea58c3
Integrate vec patterns into borrow checker.
...
The tail portion of the pattern effectively borrows a vector,
but the borrow checker knew nothing about this.
r=catamorphism
2013-01-28 10:00:32 -08:00
Tyler Bindon
c89afc3971
Fix Option camel case in a compile-fail test
...
The compile fails for another reason, that triggers before the the failure for non-camel cased option, some or none undefined errors.
2013-01-25 19:42:24 -07:00
Tyler Bindon
edc94f5c23
Fix Option camel case in xfailed/ignored tests
2013-01-25 19:42:23 -07:00
Patrick Walton
ad25e208ee
librustc: Allow &mut
to be loaned; allow self
to be loaned; make &mut
loanable to &
. r=nmatsakis
2013-01-24 13:52:22 -08:00
Tim Chevalier
86b8bf37bb
testsuite: Capitalize error message, unbreak build
2013-01-24 12:14:26 -08:00
Tim Chevalier
f3ec278e46
Merge pull request #4609 from sonwow/keyword-super
...
Make `super` a keyword
2013-01-24 11:17:52 -08:00
Tim Chevalier
5b64c796a4
syntax/rustc: Improve error message for misuse of for
loop
...
Print out a clearer error message when a `for` gets
used with the wrong type of iterator. Also fix spans on `for` loop
bodies, and suppress some more derived errors.
r=brson
Closes #3651
2013-01-24 11:04:54 -08:00
Youngsoo Son
4b2aa286d8
Make super
a keyword
2013-01-24 16:07:04 +09:00
Tim Chevalier
ab13beb05a
Merge pull request #4587 from sanxiyn/divide-by-zero
...
Handle divide by zero in constant evaluator
2013-01-23 14:56:07 -08:00
Tim Chevalier
54344c2468
testsuite: Add tests for mutable function arguments
2013-01-22 23:34:35 -08:00
Seo Sanghyeon
3ed39ce26f
Handle divide by zero in constant evaluator
2013-01-23 15:07:00 +09:00
Tim Chevalier
b9920b052b
testsuite: Tweak tests for #3888
2013-01-20 19:51:33 -08:00
Tim Chevalier
e5bf6d1afa
testsuite: Update error message, unbreak build
2013-01-20 18:22:11 -08:00
Tim Chevalier
ef0f71dc3f
testsuite: Add xfailed test for #4335
2013-01-19 17:39:15 -08:00
Tim Chevalier
1e1707ccb8
testsuite: Add license
2013-01-19 17:38:12 -08:00
Tim Chevalier
96b4f43675
Handle region errors where the actual scope is a statement
...
Prevents a case of "unknown scope, this is a bug".
I judged this too small to review. Closes #4500
2013-01-19 17:06:36 -08:00
Tim Chevalier
90372da5a8
testsuite: Update error messages. Unbreak build, I hope
2013-01-18 13:35:07 -08:00
Niko Matsakis
440f8dfc4e
Correct tests
...
rs=breakage
2013-01-17 18:45:57 -08:00
Patrick Walton
9f7514bfae
test: Fix busted compile-fail tests. rs=bustage
2013-01-17 16:30:59 -08:00
Patrick Walton
a2ec5400ff
Merge pull request #4493 from jbclements/rename-moved-variable-to-moved-value
...
s/moved variable/moved value/
2013-01-16 12:30:55 -08:00
Graydon Hoare
84825ee310
librustc: Make the default sigil for block lambdas &
instead of @
.
2013-01-15 17:57:45 -08:00
John Clements
3bf8b8af98
s/moved variable/moved value/
2013-01-14 17:38:22 -08:00
ILyoan
b7cefd0c96
allowing the entry point name to be something other than main
...
add build tests
2013-01-14 13:58:13 -08:00
Tim Chevalier
329a57882f
Add xfailed test for #3973
2013-01-10 15:35:41 -08:00
Niko Matsakis
89ed595e30
correct expected error msgs in various tests rs=breakage
2013-01-10 13:58:14 -08:00
Tim Chevalier
8a687dd8e4
tests: Add two test cases, one xfailed
2013-01-10 13:44:27 -08:00
Niko Matsakis
737e115646
mode: reset mode on entry to fn body.
...
This is an interim fix to address the "Beware!" unsoundness. I have a
more comprehensive rewrite of mode.rs in the pipeline.
r=pcwalton
2013-01-10 13:17:25 -08:00
Patrick Walton
2a1b6c4de9
librustc: Implement &static
as the replacement for Durable
. r=nmatsakis
2013-01-10 11:16:54 -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
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af247
.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Niko Matsakis
9f7dc1cb33
Remove ret_style and instead check whether fn return type is bot
...
cc #3681
2013-01-08 14:21:06 -08:00
Tim Chevalier
80435ad429
Make self
visible when typechecking nested functions
...
Necessary to allow supertrait methods to be called in default methods.
r=nikomatsakis
2013-01-08 13:56:26 -08:00
Tim Chevalier
7b433d098a
Revert "Change the self def_id to a self_info in typeck, and inherit"
...
This reverts commit 921393c568
.
2013-01-07 18:18:22 -08:00
Tim Chevalier
921393c568
Change the self def_id to a self_info in typeck, and inherit
...
That is, treat `self` as if it has dynamic scope. This seems to
be harmless, and prevents an ICE as per #3563
2013-01-07 18:08:19 -08:00
Tim Chevalier
fb9458e1ec
xfail broken tests
2013-01-07 18:05:18 -08:00
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