Commit Graph

26925 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
2b362768ff Modified list::from_vec() to return List<T> 2014-02-27 08:35:17 -04:00
Bruno de Oliveira Abinader
8846970bba Implement Eq for Cell<T> 2014-02-27 08:35:17 -04:00
Bruno de Oliveira Abinader
1e6151a770 Renamed variables 2014-02-27 08:35:16 -04:00
Bruno de Oliveira Abinader
4c553af0f8 Replaced @List with ~List in Rust's recursive example 2014-02-27 08:31:50 -04:00
Flavio Percoco
8784d2fa95 Forbid moves out of static items Closes #10577 2014-02-27 09:24:17 +01:00
Flavio Percoco
c75dd78ccb Keep track of Enum's with destructors 2014-02-27 09:24:16 +01:00
Flavio Percoco
a22539b083 Implement has_dtor method in TypeContents 2014-02-27 09:24:16 +01:00
Flavio Percoco
4cb3bd558f Remove unused type_is_pod function 2014-02-27 09:24:16 +01:00
bors
68a92c5ed5 auto merge of #12581 : alexcrichton/rust/older-llvm, r=brson
In doing so, revert travis to not using a 3.5 build because it seems to be changing enough that it's breaking our C++ glue frequently enough.
2014-02-26 21:16:36 -08:00
bors
780adfffc3 auto merge of #12486 : MicahChalmer/rust/emacs-fixes-round-3, r=brson
I've added details in the description of each comment as to what it does, which I won't redundantly repeat here in the PR.  They all relate to indentation in the emacs rust-mode.

What I will note here is that this closes #8787.  It addresses the last remaining case (not in the original issue description but in a comment), of indenting `match` statements.  With the changes here, I believe every problem described in the issue description or comments of #8787 is addressed.
2014-02-26 20:01:42 -08:00
bors
fd02f908be auto merge of #12586 : chris-morgan/rust/fix-pretty-print-slash-star-star-star-crash, r=alexcrichton
The pretty printer was treating block comments with more than two
asterisks after the first slash (e.g. `/***`) as doc comments (which are
attributes), whereas in actual fact they are just regular comments.
2014-02-26 17:26:37 -08:00
Chris Morgan
e6b032a9ef Fix a pretty printer crash on /***.
The pretty printer was treating block comments with more than two
asterisks after the first slash (e.g. `/***`) as doc comments (which are
attributes), whereas in actual fact they are just regular comments.
2014-02-27 12:16:18 +11:00
Alex Crichton
4cdc6ce337 rustc: Don't deduplicate libraries linked to
Linker argument order with respect to libraries is important enough that we
shouldn't be attempting to filter out libraries getting passed through to the
linker. When linking with a native library that has multiple dependant native
libraries, it's useful to have control over the link argument order.
2014-02-26 16:58:37 -08:00
Alex Crichton
bbdaf01a5a travis: Use LLVM 3.3 from the official repos
We can be certain that this version of LLVM will not be changing, so we don't
have to worry about API drift over time.
2014-02-26 15:22:50 -08:00
Alex Crichton
1ac5e84e91 rustc: Get rustc compiling with LLVM 3.{3,4} again
The travis builds have been breaking recently because LLVM 3.5 upstream is
changing. This looks like it's likely to continue, so it would be more useful
for us if we could lock ourselves to a system LLVM version that is not changing.

This commit has the support to bring our C++ glue to LLVM back in line with what
was possible back in LLVM 3.{3,4}. I don't think we're going to be able to
reasonably protect against regressions in the future, but this kind of code is a
good sign that we can continue to use the system LLVM for simple-ish things.
Codegen for ARM won't work and it won't have some of the perf improvements we
have, but using the system LLVM should work well enough for development.
2014-02-26 15:01:15 -08:00
bors
b4d923852e auto merge of #12572 : lifthrasiir/rust/owned-ptr-static-bound, r=alexcrichton
This is inspired by the [question](http://www.reddit.com/r/rust/comments/1yy57k/unsolved_question_from_irc/) (re-)posted to /r/rust. The error message in this question correctly states that one should add `'static` to the trait bounds, but does not state which trait bounds. This PR makes that explicit by appending two words.

This also renames `check_durable` to `check_static` and removes the outdated comment as a cleanup.
2014-02-26 12:16:43 -08:00
bors
5737d1f704 auto merge of #12490 : zslayton/rust/doc-fix-12386, r=alexcrichton
Attn: @huonw 

Addresses #12386.
2014-02-26 10:46:36 -08:00
Kang Seonghoon
9083cb24b2 rustc: Explicitly mention type params with missing 'static bounds
Also renames `check_durable` to `check_static` and removes the outdated
comment.
2014-02-27 02:14:46 +09:00
bors
86177dbbcf auto merge of #12570 : kyrias/rust/master, r=cmr
Adds a missing tilde to the end and the start of two .notrust blocks.
2014-02-26 08:36:36 -08:00
bors
05a2d32acd auto merge of #12571 : eddyb/rust/kill-callee-id, r=nikomatsakis
Every method call and overloaded operator had a `callee_id` that was be used to store the method type and type substitutions, that information is now stored in the `method_map`, alongside the method's origin.
2014-02-26 07:16:39 -08:00
Eduard Burtescu
05e4d944a9 Replace callee_id with information stored in method_map. 2014-02-26 16:06:45 +02:00
Eduard Burtescu
7a588ceff2 Rename a few typeck method-related structures to UpperCamelCase. 2014-02-26 16:01:36 +02:00
Johannes Löthberg
3d3dae8fa5 tutorial: Missing tildes around .notrust block
Adds a missing tilde to the end and the start of two .notrust blocks.
2014-02-26 14:48:40 +01:00
Florian Hahn
5d825def29 Mark top level module as a crate in rustdoc, closes #12507 2014-02-26 14:00:00 +01:00
bors
6c41f993d3 auto merge of #12547 : jagtalon/rust/jag/rust/tutorial-freezing, r=pnkfelix
- "Lending an immutable pointer" might be confusing. It was not discussed why borrowed pointers are immutable in the first place.
- Make it clear that the borrowed pointers are immutable even if the variable was declared with `mut`.
- Make it clear that we cannot even assign anything to the variable while its value is being borrowed.

tutorial: change "--" to an em-dash.

tutorial: change instances of "--" to em-dash.
2014-02-25 23:31:35 -08:00
bors
eb86913dcf auto merge of #12505 : alexcrichton/rust/fix-stack-overflow, r=brson
The printing of the error message on stack overflow had two sometimes false
assumptions previously. The first is that a local task was always available (it
called Local::take) and the second is that it used `println!` instead of
manually writing.

The first assumption isn't necessarily true because while stack overflow will
likely only be detected in situations that a local task is available, it's not
guaranteed to always be in TLS. For example, during a `println!` call a task
may be blocking, causing it to be unavailable. By using Local::try_take(), we
can be resilient against these occurrences.

The second assumption could lead to odd behavior because the stdout logger can
be overwritten to run arbitrary code. Currently this should be possible, but the
utility is much diminished because a stack overflow translates to an abort()
instead of a failure.
2014-02-25 19:21:32 -08:00
bors
2e1cfae943 auto merge of #12548 : alexcrichton/rust/up-llvm, r=huonw,brson
Upstream LLVM has changed slightly such that our PassWrapper.cpp no longer
comiles (travis errors). This updates the bundled LLVM to the latest nightly
which will hopefully fix the travis errors we're seeing.
2014-02-25 17:41:32 -08:00
Alex Crichton
4f4d43bf6c std: Tweak stack overflow printing for robustness
The printing of the error message on stack overflow had two sometimes false
assumptions previously. The first is that a local task was always available (it
called Local::take) and the second is that it used println! instead of
manually writing.

The first assumption isn't necessarily true because while stack overflow will
likely only be detected in situations that a local task is available, it's not
guaranteed to always be in TLS. For example, during a println! call a task
may be blocking, causing it to be unavailable. By using Local::try_take(), we
can be resilient against these occurrences.

The second assumption could lead to odd behavior because the stdout logger can
be overwritten to run arbitrary code. Currently this should be possible, but the
utility is much diminished because a stack overflow translates to an abort()
instead of a failure.
2014-02-25 16:51:52 -08:00
bors
3b09469a62 auto merge of #12539 : gmjosack/rust/master, r=alexcrichton
std::condition was removed in 454882dcb7
but there are still links to the guide. Removing them.
2014-02-25 16:26:30 -08:00
bors
c24946e9c6 auto merge of #12493 : eddyb/rust/saner-overloads, r=nikomatsakis
Fixes #12402.
2014-02-25 13:01:42 -08:00
bors
fc1c06d7b1 auto merge of #12457 : alexcrichton/rust/fix-some-tests, r=brson
This updates a number of ignore-test tests, and removes a few completely
outdated tests due to the feature being tested no longer being supported.

This brings a number of bench/shootout tests up to date so they're compiling
again. I make no claims to the performance of these benchmarks, it's just nice
to not have bitrotted code.

Closes #2604
Closes #9407
2014-02-25 11:41:36 -08:00
bors
fd83b2be26 auto merge of #12408 : alexcrichton/rust/manual-crate-map, r=brson
Apparently weak linkage and dlopen aren't quite working out for applications
like servo on android. There appears to be a bug or two in how android loads
dynamic libraries and for some reason libservo.so isn't being found.

As a temporary solution, add an extern "C" function to libstd which can be
called if you have a handle to the crate map manually. When crawling the crate
map, we then check this manual symbol before falling back to the old solutions.

cc #11731
2014-02-25 10:26:37 -08:00
Alex Crichton
294b27d806 Update LLVM
Upstream LLVM has changed slightly such that our PassWrapper.cpp no longer
comiles (travis errors). This updates the bundled LLVM to the latest nightly
which will hopefully fix the travis errors we're seeing.
2014-02-25 09:37:30 -08:00
Jag Talon
82747ed93e tutorial: clearer explanation of freezing.
- "Lending an immutable pointer" might be confusing. It was not discussed why borrowed pointers are immutable in the first place.
- Make it clear that the borrowed pointers are immutable even if the variable was declared with `mut`.
- Make it clear that we cannot even assign anything to the variable while its value is being borrowed.

tutorial: change "--" to an em-dash.

tutorial: change instances of "--" to em-dash.
2014-02-25 12:32:09 -05:00
Alex Crichton
1b3b273f80 Add a method of manually specifying the crate map
Apparently weak linkage and dlopen aren't quite working out for applications
like servo on android. There appears to be a bug or two in how android loads
dynamic libraries and for some reason libservo.so isn't being found.

As a temporary solution, add an extern "C" function to libstd which can be
called if you have a handle to the crate map manually. When crawling the crate
map, we then check this manual symbol before falling back to the old solutions.

cc #11731
2014-02-25 09:22:24 -08:00
Alex Crichton
9cc26cfdf4 test: Clean out the test suite a bit
This updates a number of ignore-test tests, and removes a few completely
outdated tests due to the feature being tested no longer being supported.

This brings a number of bench/shootout tests up to date so they're compiling
again. I make no claims to the performance of these benchmarks, it's just nice
to not have bitrotted code.

Closes #2604
Closes #9407
2014-02-25 09:21:09 -08:00
bors
3276090253 auto merge of #12537 : kballard/rust/add-test-to-doc-index, r=alexcrichton 2014-02-25 09:11:39 -08:00
Eduard Burtescu
39504719b4 resolve: Don't use @RefCell in trait_map, nothing modifies its entries. 2014-02-25 19:08:55 +02:00
Eduard Burtescu
9d5532618f resolve: Remove all the operator overloads from trait_map. 2014-02-25 19:08:55 +02:00
Eduard Burtescu
d096eefd80 Use only the appropriate trait when looking up operator overloads. 2014-02-25 19:08:54 +02:00
Eduard Burtescu
818203e9d2 typeck: Remove old diagnostic that refers to do. 2014-02-25 19:08:54 +02:00
bors
34a224f4a1 auto merge of #12530 : alexcrichton/rust/make-check-no-rpath, r=brson
This involves passing through LD_LIBRARY_PATH through more places, specifically
in the compiletest, run-make, and doctest runners.
2014-02-25 07:56:35 -08:00
bors
25d68366b7 auto merge of #12522 : erickt/rust/hash, r=alexcrichton
This patch series does a couple things:

* replaces manual `Hash` implementations with `#[deriving(Hash)]`
* adds `Hash` back to `std::prelude`
* minor cleanup of whitespace and variable names.
2014-02-25 06:41:36 -08:00
bors
d222f03f42 auto merge of #12525 : eddyb/rust/gate-default-type-param-usage, r=alexcrichton
Also reverted `#[deriving(Hash)]` to implement `Hash` only for `SipState`, until we decide what to do about default type params.
2014-02-25 05:26:36 -08:00
bors
27cc309a7f auto merge of #12473 : bjz/rust/remove-bool, r=alexcrichton
These were never used outside of the tests.
2014-02-25 02:16:39 -08:00
Gary M. Josack
7e85431775 Remove references to guide-conditions
std::condition was removed in 454882dcb7
but there are still links to the guide. Removing them.
2014-02-25 01:01:55 -08:00
Brendan Zabarauskas
6efa3c63d0 Remove std::bool::{Bool, all_values}
These were never used outside of the tests
2014-02-25 19:52:51 +11:00
Kevin Ballard
2003a5eb34 Add link to libtest in doc index 2014-02-24 23:11:23 -08:00
bors
4243cad56b auto merge of #12535 : alexcrichton/rust/rollup, r=alexcrichton
Closes #12474 (rustc: Don't error on the rlib symlinks) r=brson
Closes #12475 (Use lines_any() when parsing output form "ar") r=brson
Closes #12476 (Remove some obsolete ignored tests) r=alexcrichton
Closes #12481 (Make .swap_remove return Option<T>) r=brson
Closes #12485 (Remove some non-essential trait re-exports from the prelude.) r=brson
Closes #12489 (Handle multibyte characters in source files better) r=alexcrichton
Closes #12494 (Mark by-value parameters that are passed on the stack as nocapture) r=nmatsakis
Closes #12497 (syntax: allow stmt/expr macro invocations to be delimited by {}) r=alexcrichton
Closes #12508 (Match binding is assignment) r=nmatsakis
Closes #12513 (Run the travis build as one large command) r=huonw
Closes #12515 (Update source code layout in src/) r=alexcrichton
Closes #12521 (Tutorial: Add std::num::sqrt to the example) r=cmr
Closes #12529 (test: single-variant enum can't be dereferenced) r=huonw
2014-02-24 22:17:02 -08:00
Alex Crichton
7d85546721 Test fixes from rollup 2014-02-24 22:11:43 -08:00