Commit Graph

16533 Commits

Author SHA1 Message Date
bors
251d0c4557 auto merge of #5350 : yichoi/rust/pull-0313-2, r=graydon,pcwalton
FIX #5330

rename arm-unknown-android to arm-linux-androideabi
2013-03-19 17:06:55 -07:00
Luqman Aden
811d88024f Mark cfg test xfail-fast since check-fast doesn't understand compile-flags. 2013-03-19 16:50:07 -07:00
Luqman Aden
480e9ff8df compiletest: Make pretty tests actually use compile-flags. 2013-03-19 16:36:06 -07:00
Luqman Aden
6450ee91be Fix pretty printing for cfg test. 2013-03-19 16:26:23 -07:00
Andrew Paseltiner
3042321b3b syntax: split deriving module into submodules for each trait 2013-03-19 18:44:41 -04:00
bors
bc211f5032 auto merge of #5436 : alexcrichton/rust/assert-message, r=pcwalton
This would close #2761. I figured that if you're supplying your own custom message, you probably don't mind the stringification of the condition to not be in the message.
2013-03-19 15:43:02 -07:00
Andrew Paseltiner
18a594f49a syntax: move ext/deriving.rs to ext/deriving/mod.rs 2013-03-19 18:41:19 -04:00
Patrick Walton
b0bea10898 libsyntax: Accept the new [T, ..N] style for vec. 2013-03-19 15:40:04 -07:00
Patrick Walton
049e1f9a1f libsyntax: Accept static instead of const for globals 2013-03-19 14:46:27 -07:00
Luqman Aden
b9fc773649 Update run-pass/cfg-on-items.rs
Make comment describe actual behaviour.
2013-03-19 14:25:48 -07:00
bors
5ae76b5bab auto merge of #5428 : thestinger/rust/tutorial, r=catamorphism
My goal is to explain the underlying concepts first (destructors and then ownership) with plenty of step-by-step examples, so that thoroughly explaining the semantics of mutability, boxes, moves, etc. is a breeze. I'm trying to avoid the comparisons with C++ that were done before, because this should be approachable for people coming from any language. C++ programmers already know these concepts so they aren't the audience that needs to be catered to. Comparisons with other languages can be done in separate documents (like [this one](https://github.com/mozilla/rust/wiki/Rust-for-CXX-programmers)).

This still needs examples for ownership (inherited mutability), owned boxes and managed boxes.
2013-03-19 13:58:06 -07:00
Patrick Walton
2e7ec80bcc librustc: Enforce privacy for static methods.
This starts moving a bunch of privacy checks into the privacy
checking phase and out of resolve.
2013-03-19 13:40:48 -07:00
Daniel Micay
9967dc81fe rewrite the tutorial section on boxes 2013-03-19 16:27:08 -04:00
Luqman Aden
1e16edd995 Tests for cfg attribute. 2013-03-19 13:00:51 -07:00
Luqman Aden
429fed0c8b librustc: adjust logic for cfg attribute and add not predicate. 2013-03-19 13:00:51 -07:00
bors
e1888948c6 auto merge of #5426 : nikomatsakis/rust/issue-4846-lifetimes-in-expl-self, r=pcwalton
(this will be needed for snapshotting at some point)

r? @pcwalton
2013-03-19 12:43:14 -07:00
bors
a14ec73cd2 auto merge of #5356 : jld/rust/enum-less-magic, r=graydon
Fixes #1645.
2013-03-19 11:43:10 -07:00
Niko Matsakis
e821671989 Refactor trans_call to separate out the translation of the arguments, environment, and return pointer 2013-03-19 14:40:34 -04:00
Alex Crichton
14df844744 Allow custom messages on assert statements 2013-03-19 14:07:00 -04:00
bors
58209910bd auto merge of #5433 : lucab/rust/lucab/cfgspec, r=graydon
All current meta items types (word, name-value, list) are now
properly parsed by rustc --cfg command line. Fixes #2399
2013-03-19 10:43:24 -07:00
bors
3c84bac946 auto merge of #5112 : luqmana/rust/3469, r=graydon
So this is a partial fix for #3469. Partial because it only works for simple constant expressions like `32/2` and `2+2` and not for any actual constants.

For example:
```
const FOO: uint = 2+2;
let v: [int * FOO];
```

results in:
```
error: expected constant expr for vector length: Non-constant path in constant expr
```

This seems to be because at the point of error (`typeck::astconv`) the def_map doesn't contain the constant and thus it can't lookup the actual expression (`2+2` in this case).

So, feedback on what I have so far and suggestions for how to address the constant issue?
2013-03-19 09:52:17 -07:00
Luca Bruno
0a34a3f0f5 Make driver::driver::parse_cfgspecs parse any variety of meta_item
All current meta items types (word, name-value, list) are now
properly parsed by rustc --cfg command line. Fixes #2399

Signed-off-by: Luca Bruno <lucab@debian.org>
2013-03-19 14:02:59 +01:00
ILyoan
c1cacc3667 Rewrite arm/ccall.s 2013-03-19 17:23:41 +09:00
ILyoan
0f89eab89d Use NDK for building android target objects 2013-03-19 17:23:31 +09:00
ILyoan
1ded138851 Enable arm error handling abi 2 2013-03-19 17:23:18 +09:00
ILyoan
f581b2f9dd Enable arm error handling abi 2013-03-19 17:23:08 +09:00
Luqman Aden
d7d17dc14e Add tests for const exprs in fixed vec length type and vec repeat. 2013-03-18 17:31:42 -07:00
Luqman Aden
da64994f18 Fix pretty printer for fixed length vectors. 2013-03-18 17:31:42 -07:00
Luqman Aden
8b66578e66 Allow expressions that are not just a single value for repeated fixed length vector syntax. 2013-03-18 17:31:41 -07:00
Luqman Aden
787f5bb0db Now actually allow using constants in those constant expressions for [T * n]. 2013-03-18 17:31:41 -07:00
Luqman Aden
42f95d055c Allow constant expressions in [Type * n]. 2013-03-18 17:31:41 -07:00
bors
e67448d397 auto merge of #5412 : pcwalton/rust/purity, r=pcwalton
librustc: Make the compiler ignore purity. …

For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.

There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.

r? @nikomatsakis
2013-03-18 17:24:50 -07:00
Patrick Walton
e78f2e2ac5 librustc: Make the compiler ignore purity.
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.

There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Patrick Walton
c4db4faefa libsyntax: Stop parsing old lifetimes, except for the ones on data type declarations. 2013-03-18 17:21:15 -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
Luqman Aden
7352d919f6 Update rust.vim
Column limit 78 -> 100.
2013-03-18 17:19:40 -07:00
Brian Anderson
5af5766512 core: Initialize global state lazily in the Scheduler ctor
I don't want any global one-time initalization functions because
that will make embedding harder.
2013-03-18 17:00:35 -07:00
Brian Anderson
044703435b Add a way to run the test suite with the new scheduler
TESTARGS=--newrt make check-stage1-rpass

Conflicts:
	src/rt/rustrt.def.in
2013-03-18 17:00:35 -07:00
Brian Anderson
a882554a78 core: Refactor uv bindings
I can already see these are going to get massive. Putting them into multiple
files.
2013-03-18 16:59:37 -07:00
Brian Anderson
7ef54c7ecd core: Begin uv file system bindings 2013-03-18 16:59:37 -07:00
Brian Anderson
57e85b5f94 core: Add rt::io and start sketching the API 2013-03-18 16:59:37 -07:00
Brian Anderson
5e6dacf32e mk: If NO_REBUILD is set then don't rebuild core/std before testing
Can make turnaround of testing changes to core/std/syntax much faster.
2013-03-18 16:59:37 -07:00
Brian Anderson
9a075f264a core: Rename rt::io to rt::rtio
This is an internal interface. I want to use rt::io for public interfaces.
2013-03-18 16:59:37 -07:00
Brian Anderson
42cba98509 core: Convert some multiline statements to single-line 2013-03-18 16:59:37 -07:00
Brian Anderson
54bb7226e1 core: Simplify uvll bindings and strip out currently-unused bits
No more mapping uv structs to Rust structs
2013-03-18 16:59:37 -07:00
Brian Anderson
723d2247c1 core: Don't use printf in rtdebug!
The bots were showing a segfault that I can't reproduce. Assuming it's
varargs related so let's not use printf
2013-03-18 16:59:11 -07:00
Brian Anderson
d30c758974 Give core::rt and std::net their own uvll bindings
I intend to do some big refactoring and don't want to deal w/ std just now
2013-03-18 16:59:11 -07:00
Brian Anderson
e8ddef93da core: Cleanup rt::context 2013-03-18 16:59:10 -07:00
Patrick Walton
dc69018495 librustc: Make the compiler ignore purity.
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.

There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 13:21:25 -07:00
Niko Matsakis
a6187c62e9 Make &self permit explicit lifetimes, but don't really use them
(this will be needed for snapshotting at some point).
2013-03-18 15:03:37 -04:00