about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-09-14auto merge of #9165 : klutzy/rust/newrt-file-fix, r=sanxiynbors-0/+9
It was broken on win32 because of header inconsistency.
2013-09-14auto merge of #9162 : alexcrichton/rust/issue-9123, r=catamorphismbors-0/+44
Closes #9123
2013-09-14auto merge of #9160 : alexcrichton/rust/local-data-docs, r=huonwbors-7/+8
Remove references to local_data::Key and only mention the macro for how to construct new keys into local data.
2013-09-14auto merge of #9156 : sfackler/rust/buffered-fix, r=huonwbors-13/+19
This is a workaround for #9155. Currently, any uses of BufferedStream outside of libstd ICE.
2013-09-14auto merge of #9115 : erickt/rust/master, r=ericktbors-225/+1096
This is a series of patches to modernize option and result. The highlights are: * rename `.unwrap_or_default(value)` and etc to `.unwrap_or(value)` * add `.unwrap_or_default()` that uses the `Default` trait * add `Default` implementations for vecs, HashMap, Option * add `Option.and(T) -> Option<T>`, `Option.and_then(&fn() -> Option<T>) -> Option<T>`, `Option.or(T) -> Option<T>`, and `Option.or_else(&fn() -> Option<T>) -> Option<T>` * add `option::ToOption`, `option::IntoOption`, `option::AsOption`, `result::ToResult`, `result::IntoResult`, `result::AsResult`, `either::ToEither`, and `either::IntoEither`, `either::AsEither` * renamed `Option::chain*` and `Result::chain*` to `and_then` and `or_else` to avoid the eventual collision with `Iterator.chain`. * Added a bunch of impls of `Default` * Added a `#[deriving(Default)]` syntax extension * Removed impls of `Zero` for `Option<T>` and vecs.
2013-09-14Get rid of unused SimpleVisitor stuff.Lindsey Kuper-144/+3
2013-09-13auto merge of #9185 : alexcrichton/rust/less-changing-directories, r=huonwbors-178/+119
While usage of change_dir_locked is synchronized against itself, it's not synchronized against other relative path usage, so I'm of the opinion that it just really doesn't help in running tests. In order to prevent the problems that have been cropping up, this completely removes the function. All existing tests (except one) using it have been moved to run-pass tests where they get their own process and don't need to be synchronized with anyone else. There is one now-ignored rustpkg test because when I moved it to a run-pass test apparently run-pass isn't set up to have 'extern mod rustc' (it ends up having linkage failures).
2013-09-13Remove all usage of change_dir_lockedAlex Crichton-178/+119
While usage of change_dir_locked is synchronized against itself, it's not synchronized against other relative path usage, so I'm of the opinion that it just really doesn't help in running tests. In order to prevent the problems that have been cropping up, this completely removes the function. All existing tests (except one) using it have been moved to run-pass tests where they get their own process and don't need to be synchronized with anyone else. There is one now-ignored rustpkg test because when I moved it to a run-pass test apparently run-pass isn't set up to have 'extern mod rustc' (it ends up having linkage failures).
2013-09-13auto merge of #9176 : brson/rust/issue-9129, r=catamorphismbors-2/+10
Servo is hitting this problem, so this is a workaround for lack of a real solution. No tests because I couldn't actually reproduce the problem with either of the testcases in #9129
2013-09-13Pass a more proper span to the syntax expandersAlex Crichton-1/+32
Closes #5794
2013-09-14Add Orderable bound to num::PrimitiveBrendan Zabarauskas-0/+1
2013-09-14extra::workcache: Remodel the (internal) struct Workblake2-ppc-16/+16
Using an enum with two cases for `Work` reveals simpler code than the previous `Option<Either<X, Y>>` representation.
2013-09-14std::logging: Use a more specific enum than Eitherblake2-ppc-18/+18
2013-09-14extra::test: Use Result instead of Either.blake2-ppc-11/+9
OptRes was combining a successful value with an error message, which fits the Result type perfectly.
2013-09-14syntax: Remove use of Either in parse.rsblake2-ppc-21/+15
The arg or capture type alias was actually never used for the capture case, so the code is simplified with `Either<arg, ()>` replaced by `arg`
2013-09-13auto merge of #9173 : thestinger/rust/offset, r=alexcrichtonbors-5/+0
This was intended to always use inbounds pointer arithmetic now.
2013-09-13Refactor libsyntax Visitor impls to use default methods.Lindsey Kuper-275/+3
2013-09-13Minor cleanup and formatting tweaks to the rust-mode READMELindsey Kuper-25/+28
2013-09-13Work around a compiler crash folding labeled break. #9129Brian Anderson-2/+10
Servo is hitting this problem, so this is a workaround for a lack of a real solution.
2013-09-13make ! support the equality/ordering operatorsDaniel Micay-1/+14
An expression such as `bottom == not_bottom` or `not_bottom == bottom` already compiled, but this fixes the case where both sides are `bottom`.
2013-09-13ptr: fix offset intrinsicDaniel Micay-5/+0
This was intended to always use inbounds pointer arithmetic now.
2013-09-13auto merge of #9158 : thestinger/rust/extern, r=alexcrichtonbors-10/+10
Since function pointers do not carry along the function attributes with them in the type, this needs to be set on the call instruction itself. Closes #9152
2013-09-13auto merge of #9151 : ↵bors-31/+94
catamorphism/rust/rustpkg-target-specific-subdirectory, r=brson r? @brson As per rustpkg.md, rustpkg now builds in a target-specific subdirectory of build/, and installs libraries into a target-specific subdirectory of lib. Closes #8672
2013-09-13auto merge of #9170 : alexcrichton/rust/flaky-fileinput, r=ericktbors-188/+203
The glob tests cannot change the current working directory because the other tests (namely the fileinput ones) depend on the current working directory not changing.
2013-09-13Move glob tests to a run-pass testAlex Crichton-188/+203
The normal unit tests cannot change the current working directory because it messes with the other tests which depend on a particular working directory.
2013-09-13rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/Tim Chevalier-31/+94
As per rustpkg.md, rustpkg now builds in a target-specific subdirectory of build/, and installs libraries into a target-specific subdirectory of lib. Closes #8672
2013-09-13set sret attribute as needed on call instructionsDaniel Micay-10/+10
Since function pointers do not carry along the function attributes with them in the type, this needs to be set on the call instruction itself. Closes #9152
2013-09-13std: Fix another windows problem with the unwrap_or_default renameErick Tryzelaar-1/+1
2013-09-13std: rename Option.chain to Option.and_then on windowsErick Tryzelaar-1/+1
2013-09-13std::rt::io: Fix file I/O on Win32klutzy-0/+9
It was broken on win32 because of header inconsistency.
2013-09-13auto merge of #9141 : alexcrichton/rust/ignore-fileinput, r=catamorphismbors-10/+23
These tests are being very flaky on the bots, and the reason is that files are being created and then when attempted to get read they actually don't exist. I'm not entirely sure why this is happening, but I also don't fully trust the std::io implemention using @-boxes to close/flush/write files at the right time. This moves the tests to using std::rt::io which is hopefully more robust and something that we can actually reason about. Sadly, due to #8810, these tests fail on windows, so they're all ignored on windows right now.
2013-09-13Translate nested items in default methodsAlex Crichton-0/+44
Closes #9123
2013-09-13auto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphismbors-5/+9
Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.
2013-09-12Improve the local_data docs slightlyAlex Crichton-7/+8
Remove references to local_data::Key and only mention the macro for how to construct new keys into local data.
2013-09-12auto merge of #9087 : fhahn/rust/rust_crate_map, r=brsonbors-229/+224
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
2013-09-12Stop using newtypes in rt::io::bufferedSteven Fackler-13/+19
This is a workaround for #9155. Currently, any uses of BufferedStream outside of libstd ICE.
2013-09-12auto merge of #8796 : brson/rust/cstack, r=pnkfelixbors-0/+63
2013-09-12rustpkg: Install to RUST_PATHTim Chevalier-9/+52
Install to the first directory in the RUST_PATH if the user set a RUST_PATH. In the case where RUST_PATH isn't set, the behavior remains unchanged. Closes #7402
2013-09-12std: Restore Option::chain{,_mut}_ref as and_then{,_mut}_refErick Tryzelaar-31/+31
2013-09-12std: Remove Zero impl for OptionErick Tryzelaar-6/+0
Options are not numeric types, so it doesn't make sense for them to implement Zero.
2013-09-12std: Remove Zero impl from vecErick Tryzelaar-25/+7
Vecs are not numeric types, so it doesn't make sense for them to implement Zero.
2013-09-12syntax: add #[deriving(Default)] syntax extensionErick Tryzelaar-2/+123
2013-09-12std: Add a bunch of Default implsErick Tryzelaar-5/+82
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-161/+202
2013-09-12std: Add ToEither/IntoEither/AsEitherErick Tryzelaar-21/+162
2013-09-12std: Add ToResult/IntoResult/AsResultErick Tryzelaar-12/+171
2013-09-12std: Add ToOption/IntoOption/AsOptionErick Tryzelaar-0/+185
2013-09-12std: fix a warningErick Tryzelaar-1/+1
2013-09-12std: Add Option.{and,and_then,or,or_else}Erick Tryzelaar-10/+83
2013-09-12std: Add Option.unwrap_or_else and a couple testsErick Tryzelaar-0/+47