]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #9118 : alexcrichton/rust/llvm-fix, r=sanxiyn
bors [Mon, 16 Sep 2013 05:30:55 +0000 (22:30 -0700)]
auto merge of #9118 : alexcrichton/rust/llvm-fix, r=sanxiyn

I created a new branch  rust-llvm-2013-09-11 in my llvm repo to mark this momentous occasion

10 years agoauto merge of #9219 : thestinger/rust/function-split, r=alexcrichton
bors [Mon, 16 Sep 2013 04:00:54 +0000 (21:00 -0700)]
auto merge of #9219 : thestinger/rust/function-split, r=alexcrichton

10 years agoteach Call/CallWithConv to set attributes
Daniel Micay [Fri, 13 Sep 2013 04:14:17 +0000 (00:14 -0400)]
teach Call/CallWithConv to set attributes

10 years agoUpgrade LLVM to close #9117
Alex Crichton [Wed, 11 Sep 2013 08:41:40 +0000 (01:41 -0700)]
Upgrade LLVM to close #9117

10 years agoremove unused `FastCall` wrapper
Daniel Micay [Fri, 13 Sep 2013 03:41:01 +0000 (23:41 -0400)]
remove unused `FastCall` wrapper

this can just be done using CallWithConv

10 years agoauto merge of #9213 : dcrewi/rust/rust-test-arguments, r=catamorphism
bors [Sun, 15 Sep 2013 21:00:52 +0000 (14:00 -0700)]
auto merge of #9213 : dcrewi/rust/rust-test-arguments, r=catamorphism

The arguments after `rust test filename.rs` should be passed through
to the test binary. This allows the `rust` command to be used to run a
subset of tests, to run ignored tests, and to run benchmarks.

10 years agorust test: pass the remaining arguments through
David Creswick [Sun, 15 Sep 2013 19:43:35 +0000 (14:43 -0500)]
rust test: pass the remaining arguments through

The arguments after `rust test filename.rs` should be passed through
to the test binary. This allows the `rust` command to be used to run a
subset of tests, to run ignored tests, and to run benchmarks.

10 years agoauto merge of #9168 : michaelwoerister/rust/traits, r=jdm
bors [Sun, 15 Sep 2013 18:55:49 +0000 (11:55 -0700)]
auto merge of #9168 : michaelwoerister/rust/traits, r=jdm

This pull request finally adds support for recursive type definitions and provides a stub implementation for object pointers.

10 years agoauto merge of #9150 : catamorphism/rust/rustpkg-cleanup, r=catamorphism
bors [Sun, 15 Sep 2013 17:25:48 +0000 (10:25 -0700)]
auto merge of #9150 : catamorphism/rust/rustpkg-cleanup, r=catamorphism

Just refactoring in tests.rs.

10 years agorustpkg: Cleanup
Tim Chevalier [Fri, 13 Sep 2013 01:48:02 +0000 (18:48 -0700)]
rustpkg: Cleanup

10 years agodebuginfo: Added LLVMDICompositeTypeSetTypeArray to rustllvm.def.in
Michael Woerister [Sun, 15 Sep 2013 15:52:56 +0000 (17:52 +0200)]
debuginfo: Added LLVMDICompositeTypeSetTypeArray to rustllvm.def.in

10 years agoauto merge of #9209 : blake2-ppc/rust/from-str, r=thestinger
bors [Sun, 15 Sep 2013 15:35:50 +0000 (08:35 -0700)]
auto merge of #9209 : blake2-ppc/rust/from-str, r=thestinger

Remove these in favor of the two traits themselves and the wrapper
function std::from_str::from_str.

Add the function std::num::from_str_radix in the corresponding role for
the FromStrRadix trait.

With `from_str` in the prelude, and `from_str_radix` in `std::num`, the feature is unfied under the type annotation of these functions instead of using the modules-named-as-types (std::uint and others):

What was before:

    let n = std::uint::from_str("1");
    let m = std::i32::from_str_radix("10", 16);

is now:

    let n = from_str::<uint>("1");
    let m = std::num::from_str_radix::<i32>("10", 16);

10 years agoRemove {uint,int,u64,i64,...}::from_str,from_str_radix
blake2-ppc [Sun, 15 Sep 2013 05:27:32 +0000 (07:27 +0200)]
Remove {uint,int,u64,i64,...}::from_str,from_str_radix

Remove these in favor of the two traits themselves and the wrapper
function std::from_str::from_str.

Add the function std::num::from_str_radix in the corresponding role for
the FromStrRadix trait.

10 years agodebuginfo: Some namespace-related cleanup.
Michael Woerister [Sun, 15 Sep 2013 10:26:47 +0000 (12:26 +0200)]
debuginfo: Some namespace-related cleanup.

10 years agodebuginfo: Fix style nits for pull request.
Michael Woerister [Sun, 15 Sep 2013 09:22:22 +0000 (11:22 +0200)]
debuginfo: Fix style nits for pull request.

10 years agodebuginfo: Added description of algorithm for handling recursive types.
Michael Woerister [Fri, 13 Sep 2013 14:26:35 +0000 (16:26 +0200)]
debuginfo: Added description of algorithm for handling recursive types.

Also fixed nasty bug caused by calling LLVMDIBuilderCreateStructType() with a null pointer where an empty array was expected (which would trigger an unintelligable assertion somewhere down the line).

10 years agodebuginfo: Added test cases for recursive structs.
Michael Woerister [Fri, 13 Sep 2013 09:41:49 +0000 (11:41 +0200)]
debuginfo: Added test cases for recursive structs.

10 years agodebuginfo: Support for recursive types.
Michael Woerister [Wed, 11 Sep 2013 14:37:43 +0000 (16:37 +0200)]
debuginfo: Support for recursive types.

10 years agodebuginfo: Implement DI for ty_opaque_box.
Michael Woerister [Wed, 11 Sep 2013 12:09:18 +0000 (14:09 +0200)]
debuginfo: Implement DI for ty_opaque_box.

10 years agodebuginfo: Basic support for trait objects.
Michael Woerister [Wed, 11 Sep 2013 09:08:44 +0000 (11:08 +0200)]
debuginfo: Basic support for trait objects.

10 years agoauto merge of #9153 : alexcrichton/rust/simplify-format, r=huonw
bors [Sun, 15 Sep 2013 08:50:50 +0000 (01:50 -0700)]
auto merge of #9153 : alexcrichton/rust/simplify-format, r=huonw

This follows from the discussion in #9012.

* All macros are now defined in terms of `format_args!` allowing for removal of a good bit of code in the syntax extension
* The syntax extension is now in a more aptly-named file, `format.rs`
* Documentation was added for the `format!`-related macros.

10 years agoFix expand_stmt as well as expand_expr to use the correct span
Alex Crichton [Sun, 15 Sep 2013 08:27:38 +0000 (01:27 -0700)]
Fix expand_stmt as well as expand_expr to use the correct span

The same fix as before is still relevant, I just forgot to update the
expand_stmt macro expansion site. The tests for format!() suffice as tests for
this change.

10 years agoDocument all of the format! related macros
Alex Crichton [Fri, 13 Sep 2013 03:08:50 +0000 (20:08 -0700)]
Document all of the format! related macros

10 years agoReduce the amount of complexity in format!
Alex Crichton [Fri, 13 Sep 2013 02:36:58 +0000 (19:36 -0700)]
Reduce the amount of complexity in format!

This renames the syntax-extension file to format from ifmt, and it also reduces
the amount of complexity inside by defining all other macros in terms of
format_args!

10 years agoauto merge of #9203 : thestinger/rust/range_step, r=huonw
bors [Sun, 15 Sep 2013 06:00:52 +0000 (23:00 -0700)]
auto merge of #9203 : thestinger/rust/range_step, r=huonw

10 years agoiter: add the edge case tests for `range` too
Daniel Micay [Sun, 15 Sep 2013 04:54:32 +0000 (00:54 -0400)]
iter: add the edge case tests for `range` too

10 years agoauto merge of #9179 : catamorphism/rust/rustpkg-package-id, r=catamorphism,metajack
bors [Sun, 15 Sep 2013 04:45:49 +0000 (21:45 -0700)]
auto merge of #9179 : catamorphism/rust/rustpkg-package-id, r=catamorphism,metajack

r? @metajack - This solves the problem you were having earlier with things like ```extern mod geom = "rust-geom";``` (or something like that).

10 years agorm some uses of the `advance` iterator method
Daniel Micay [Sat, 14 Sep 2013 19:51:02 +0000 (15:51 -0400)]
rm some uses of the `advance` iterator method

10 years agoremove old internal iterator range tests
Daniel Micay [Sun, 15 Sep 2013 04:44:48 +0000 (00:44 -0400)]
remove old internal iterator range tests

The cases they test are well covered in the `std::iter` tests.

10 years agorustpkg: Always write a package_id attribute into the link metadata
Tim Chevalier [Sat, 14 Sep 2013 01:04:45 +0000 (18:04 -0700)]
rustpkg: Always write a package_id attribute into the link metadata

For some reason, I thought it wasn't necessary to write the package_id
attribute (which rustc's filesearch checks when searching for a package)
if the package ID had a single component (like "foo") as opposed to multiple
components (like "foo/bar/quux"). This meant that
`extern mod quux = "an-awesome-library";` didn't work, even if an-awesome-library
existed in the RUST_PATH.

Fixed it.

10 years agostd::num: Remove `range_step` for each numeric type
blake2-ppc [Sun, 15 Sep 2013 00:47:20 +0000 (02:47 +0200)]
std::num: Remove `range_step` for each numeric type

Replaced by `std::iter::range_step`

10 years agoUse std::iter::range_step
blake2-ppc [Sun, 15 Sep 2013 00:46:51 +0000 (02:46 +0200)]
Use std::iter::range_step

Use the iterator version instead of the old uint::/int::range_step
functions.

10 years agoiter: fix `RangeInclusive`'s `DoubleEndedIterator`
Daniel Micay [Sun, 15 Sep 2013 04:39:34 +0000 (00:39 -0400)]
iter: fix `RangeInclusive`'s `DoubleEndedIterator`

10 years agoiter: fix `range_inclusive` when `start > stop`
Daniel Micay [Sun, 15 Sep 2013 04:27:52 +0000 (00:27 -0400)]
iter: fix `range_inclusive` when `start > stop`

10 years agofix range_step{,_inclusive} with negative step
Daniel Micay [Sun, 15 Sep 2013 04:11:50 +0000 (00:11 -0400)]
fix range_step{,_inclusive} with negative step

10 years agoauto merge of #9200 : lkuper/rust/libsyntax-cleanup, r=luqmana
bors [Sun, 15 Sep 2013 01:25:49 +0000 (18:25 -0700)]
auto merge of #9200 : lkuper/rust/libsyntax-cleanup, r=luqmana

10 years agoauto merge of #9199 : thestinger/rust/range_step, r=cmr
bors [Sun, 15 Sep 2013 00:10:51 +0000 (17:10 -0700)]
auto merge of #9199 : thestinger/rust/range_step, r=cmr

My focus was on getting these to be correct in all cases by handling overflow properly. I'll clean them up and work on the performance later.

10 years agoThese impls, at least, can be avoided by deriving Ord.
Lindsey Kuper [Sat, 14 Sep 2013 23:37:39 +0000 (19:37 -0400)]
These impls, at least, can be avoided by deriving Ord.

10 years agoKill off method impls made redundant by default methods.
Lindsey Kuper [Sat, 14 Sep 2013 23:34:03 +0000 (19:34 -0400)]
Kill off method impls made redundant by default methods.

10 years agoiter: add `RangeStep` and `RangeStepInclusive`
Daniel Micay [Sat, 14 Sep 2013 20:47:21 +0000 (16:47 -0400)]
iter: add `RangeStep` and `RangeStepInclusive`

10 years agoauto merge of #9198 : FlaPer87/rust/shared-port, r=cmr
bors [Sat, 14 Sep 2013 22:20:50 +0000 (15:20 -0700)]
auto merge of #9198 : FlaPer87/rust/shared-port, r=cmr

SharedPort implementation was missing in std::comm. Since this module
also wraps SharedChan, it makes sense to have SharedPort defined there
as well.

10 years agoauto merge of #9191 : huonw/rust/are-you-tired, r=cmr
bors [Sat, 14 Sep 2013 21:05:51 +0000 (14:05 -0700)]
auto merge of #9191 : huonw/rust/are-you-tired, r=cmr

Allows `std::rt::io::timer::sleep(1000)` rather than `std::rt::io::timer::Timer::new().unwrap().sleep(1000)`.

10 years agoiter: move Counter impl to the proper place
Daniel Micay [Sat, 14 Sep 2013 20:37:52 +0000 (16:37 -0400)]
iter: move Counter impl to the proper place

10 years agoiter: replace comment with a docstring
Daniel Micay [Sat, 14 Sep 2013 20:34:32 +0000 (16:34 -0400)]
iter: replace comment with a docstring

10 years agoAdd SharedPort wrapper around rt::comm::SharedPort
Flavio Percoco [Sat, 14 Sep 2013 20:50:28 +0000 (22:50 +0200)]
Add SharedPort wrapper around rt::comm::SharedPort

SharedPort implementation was missing in std::comm. Since this module
also wraps SharedChan, it makes sense to have SharedPort defined there
as well.

10 years agoiter: fix range docstrings
Daniel Micay [Sat, 14 Sep 2013 20:33:19 +0000 (16:33 -0400)]
iter: fix range docstrings

10 years agoauto merge of #9183 : alexcrichton/rust/issue-5794, r=catamorphism
bors [Sat, 14 Sep 2013 19:30:54 +0000 (12:30 -0700)]
auto merge of #9183 : alexcrichton/rust/issue-5794, r=catamorphism

Closes #5794

10 years agoauto merge of #9182 : bjz/rust/master, r=brson
bors [Sat, 14 Sep 2013 18:15:54 +0000 (11:15 -0700)]
auto merge of #9182 : bjz/rust/master, r=brson

Somehow this was missed!

cc #4819

10 years agoauto merge of #9181 : lkuper/rust/libsyntax-default-methods-refactor, r=alexcrichton
bors [Sat, 14 Sep 2013 17:05:51 +0000 (10:05 -0700)]
auto merge of #9181 : lkuper/rust/libsyntax-default-methods-refactor, r=alexcrichton

I'm getting the three `make check` failures mentioned in issue #9127, which I also get building master.

10 years agoauto merge of #9180 : blake2-ppc/rust/reduce-either, r=catamorphism
bors [Sat, 14 Sep 2013 15:50:50 +0000 (08:50 -0700)]
auto merge of #9180 : blake2-ppc/rust/reduce-either, r=catamorphism

Work a bit towards #9157 "Remove Either". These instances don't need to use Either and are better expressed in other ways (removing allocations and simplifying types).

10 years agoauto merge of #9178 : lkuper/rust/docs, r=catamorphism
bors [Sat, 14 Sep 2013 14:30:54 +0000 (07:30 -0700)]
auto merge of #9178 : lkuper/rust/docs, r=catamorphism

10 years agostd::rt: Add a standalone sleep function.
Huon Wilson [Sat, 14 Sep 2013 14:00:13 +0000 (00:00 +1000)]
std::rt: Add a standalone sleep function.

10 years agoauto merge of #9174 : thestinger/rust/bot, r=catamorphism
bors [Sat, 14 Sep 2013 13:15:52 +0000 (06:15 -0700)]
auto merge of #9174 : thestinger/rust/bot, r=catamorphism

An expression such as `bottom == not_bottom` or `not_bottom == bottom`
already compiled, but this fixes the case where both sides are `bottom`.

10 years agoauto merge of #9165 : klutzy/rust/newrt-file-fix, r=sanxiyn
bors [Sat, 14 Sep 2013 12:00:56 +0000 (05:00 -0700)]
auto merge of #9165 : klutzy/rust/newrt-file-fix, r=sanxiyn

It was broken on win32 because of header inconsistency.

10 years agoauto merge of #9162 : alexcrichton/rust/issue-9123, r=catamorphism
bors [Sat, 14 Sep 2013 10:45:56 +0000 (03:45 -0700)]
auto merge of #9162 : alexcrichton/rust/issue-9123, r=catamorphism

Closes #9123

10 years agoauto merge of #9160 : alexcrichton/rust/local-data-docs, r=huonw
bors [Sat, 14 Sep 2013 09:30:59 +0000 (02:30 -0700)]
auto merge of #9160 : alexcrichton/rust/local-data-docs, r=huonw

Remove references to local_data::Key and only mention the macro for how to
construct new keys into local data.

10 years agoauto merge of #9156 : sfackler/rust/buffered-fix, r=huonw
bors [Sat, 14 Sep 2013 08:16:00 +0000 (01:16 -0700)]
auto merge of #9156 : sfackler/rust/buffered-fix, r=huonw

This is a workaround for #9155. Currently, any uses of BufferedStream
outside of libstd ICE.

10 years agoauto merge of #9115 : erickt/rust/master, r=erickt
bors [Sat, 14 Sep 2013 07:01:04 +0000 (00:01 -0700)]
auto merge of #9115 : erickt/rust/master, r=erickt

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.

10 years agoauto merge of #9185 : alexcrichton/rust/less-changing-directories, r=huonw
bors [Sat, 14 Sep 2013 05:16:03 +0000 (22:16 -0700)]
auto merge of #9185 : alexcrichton/rust/less-changing-directories, r=huonw

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).

10 years agoRemove all usage of change_dir_locked
Alex Crichton [Sat, 14 Sep 2013 04:41:28 +0000 (21:41 -0700)]
Remove all usage of change_dir_locked

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).

10 years agoauto merge of #9176 : brson/rust/issue-9129, r=catamorphism
bors [Sat, 14 Sep 2013 04:06:02 +0000 (21:06 -0700)]
auto merge of #9176 : brson/rust/issue-9129, r=catamorphism

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

10 years agoPass a more proper span to the syntax expanders
Alex Crichton [Sat, 14 Sep 2013 03:54:52 +0000 (20:54 -0700)]
Pass a more proper span to the syntax expanders

Closes #5794

10 years agoAdd Orderable bound to num::Primitive
Brendan Zabarauskas [Sat, 14 Sep 2013 02:01:29 +0000 (12:01 +1000)]
Add Orderable bound to num::Primitive

10 years agoextra::workcache: Remodel the (internal) struct Work
blake2-ppc [Sat, 14 Sep 2013 02:07:51 +0000 (04:07 +0200)]
extra::workcache: Remodel the (internal) struct Work

Using an enum with two cases for `Work` reveals simpler code than the
previous `Option<Either<X, Y>>` representation.

10 years agostd::logging: Use a more specific enum than Either
blake2-ppc [Sat, 14 Sep 2013 02:07:43 +0000 (04:07 +0200)]
std::logging: Use a more specific enum than Either

10 years agoextra::test: Use Result instead of Either.
blake2-ppc [Sat, 14 Sep 2013 02:07:43 +0000 (04:07 +0200)]
extra::test: Use Result instead of Either.

OptRes was combining a successful value with an error message, which
fits the Result type perfectly.

10 years agosyntax: Remove use of Either in parse.rs
blake2-ppc [Sat, 14 Sep 2013 02:07:43 +0000 (04:07 +0200)]
syntax: Remove use of Either in parse.rs

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`

10 years agoauto merge of #9173 : thestinger/rust/offset, r=alexcrichton
bors [Sat, 14 Sep 2013 01:00:58 +0000 (18:00 -0700)]
auto merge of #9173 : thestinger/rust/offset, r=alexcrichton

This was intended to always use inbounds pointer arithmetic now.

10 years agoRefactor libsyntax Visitor impls to use default methods.
Lindsey Kuper [Tue, 10 Sep 2013 01:57:50 +0000 (21:57 -0400)]
Refactor libsyntax Visitor impls to use default methods.

10 years agoMinor cleanup and formatting tweaks to the rust-mode README
Lindsey Kuper [Sat, 14 Sep 2013 00:42:40 +0000 (20:42 -0400)]
Minor cleanup and formatting tweaks to the rust-mode README

10 years agoWork around a compiler crash folding labeled break. #9129
Brian Anderson [Fri, 13 Sep 2013 23:00:18 +0000 (16:00 -0700)]
Work around a compiler crash folding labeled break. #9129

Servo is hitting this problem, so this is a workaround for a lack of a real solution.

10 years agomake ! support the equality/ordering operators
Daniel Micay [Fri, 13 Sep 2013 21:26:57 +0000 (17:26 -0400)]
make ! support the equality/ordering operators

An expression such as `bottom == not_bottom` or `not_bottom == bottom`
already compiled, but this fixes the case where both sides are `bottom`.

10 years agoptr: fix offset intrinsic
Daniel Micay [Fri, 13 Sep 2013 21:13:17 +0000 (17:13 -0400)]
ptr: fix offset intrinsic

This was intended to always use inbounds pointer arithmetic now.

10 years agoauto merge of #9158 : thestinger/rust/extern, r=alexcrichton
bors [Fri, 13 Sep 2013 21:10:52 +0000 (14:10 -0700)]
auto merge of #9158 : thestinger/rust/extern, r=alexcrichton

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

10 years agoauto merge of #9151 : catamorphism/rust/rustpkg-target-specific-subdirectory, r=brson
bors [Fri, 13 Sep 2013 19:55:54 +0000 (12:55 -0700)]
auto merge of #9151 : 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

10 years agoauto merge of #9170 : alexcrichton/rust/flaky-fileinput, r=erickt
bors [Fri, 13 Sep 2013 18:45:56 +0000 (11:45 -0700)]
auto merge of #9170 : alexcrichton/rust/flaky-fileinput, r=erickt

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.

10 years agoMove glob tests to a run-pass test
Alex Crichton [Fri, 13 Sep 2013 16:37:45 +0000 (09:37 -0700)]
Move glob tests to a run-pass test

The normal unit tests cannot change the current working directory because it
messes with the other tests which depend on a particular working directory.

10 years agorustc/rustpkg: Use a target-specific subdirectory in build/ and lib/
Tim Chevalier [Fri, 13 Sep 2013 02:29:21 +0000 (19:29 -0700)]
rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/

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

10 years agoset sret attribute as needed on call instructions
Daniel Micay [Fri, 13 Sep 2013 03:23:44 +0000 (23:23 -0400)]
set sret attribute as needed on call instructions

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

10 years agostd: Fix another windows problem with the unwrap_or_default rename
Erick Tryzelaar [Fri, 13 Sep 2013 14:09:32 +0000 (07:09 -0700)]
std: Fix another windows problem with the unwrap_or_default rename

10 years agostd: rename Option.chain to Option.and_then on windows
Erick Tryzelaar [Fri, 13 Sep 2013 13:58:46 +0000 (06:58 -0700)]
std: rename Option.chain to Option.and_then on windows

10 years agostd::rt::io: Fix file I/O on Win32
klutzy [Fri, 13 Sep 2013 10:23:57 +0000 (19:23 +0900)]
std::rt::io: Fix file I/O on Win32

It was broken on win32 because of header inconsistency.

10 years agoauto merge of #9141 : alexcrichton/rust/ignore-fileinput, r=catamorphism
bors [Fri, 13 Sep 2013 09:25:49 +0000 (02:25 -0700)]
auto merge of #9141 : alexcrichton/rust/ignore-fileinput, r=catamorphism

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.

10 years agoTranslate nested items in default methods
Alex Crichton [Fri, 13 Sep 2013 08:42:44 +0000 (01:42 -0700)]
Translate nested items in default methods

Closes #9123

10 years agoauto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphism
bors [Fri, 13 Sep 2013 08:00:50 +0000 (01:00 -0700)]
auto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphism

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.

10 years agoImprove the local_data docs slightly
Alex Crichton [Fri, 13 Sep 2013 06:26:06 +0000 (23:26 -0700)]
Improve the local_data docs slightly

Remove references to local_data::Key and only mention the macro for how to
construct new keys into local data.

10 years agoauto merge of #9087 : fhahn/rust/rust_crate_map, r=brson
bors [Fri, 13 Sep 2013 06:00:51 +0000 (23:00 -0700)]
auto merge of #9087 : fhahn/rust/rust_crate_map, r=brson

This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.

10 years agoStop using newtypes in rt::io::buffered
Steven Fackler [Fri, 13 Sep 2013 04:48:47 +0000 (21:48 -0700)]
Stop using newtypes in rt::io::buffered

This is a workaround for #9155. Currently, any uses of BufferedStream
outside of libstd ICE.

10 years agoauto merge of #8796 : brson/rust/cstack, r=pnkfelix
bors [Fri, 13 Sep 2013 04:30:47 +0000 (21:30 -0700)]
auto merge of #8796 : brson/rust/cstack, r=pnkfelix

10 years agoauto merge of #9147 : catamorphism/rust/rustpkg-install-to-rust-path, r=catamorphism...
bors [Fri, 13 Sep 2013 02:30:46 +0000 (19:30 -0700)]
auto merge of #9147 : catamorphism/rust/rustpkg-install-to-rust-path, r=catamorphism,metajack

r? @metajack 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

10 years agorustpkg: Install to RUST_PATH
Tim Chevalier [Thu, 12 Sep 2013 23:13:30 +0000 (16:13 -0700)]
rustpkg: Install to RUST_PATH

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

10 years agostd: Restore Option::chain{,_mut}_ref as and_then{,_mut}_ref
Erick Tryzelaar [Fri, 13 Sep 2013 01:54:02 +0000 (18:54 -0700)]
std: Restore Option::chain{,_mut}_ref as and_then{,_mut}_ref

10 years agoDocument the Zero trait
Erick Tryzelaar [Thu, 12 Sep 2013 13:39:45 +0000 (06:39 -0700)]
Document the Zero trait

10 years agostd: Remove Zero impl for Option
Erick Tryzelaar [Thu, 12 Sep 2013 05:19:19 +0000 (22:19 -0700)]
std: Remove Zero impl for Option

Options are not numeric types, so it doesn't make sense for them to
implement Zero.

10 years agostd: Remove Zero impl from vec
Erick Tryzelaar [Thu, 12 Sep 2013 05:16:22 +0000 (22:16 -0700)]
std: Remove Zero impl from vec

Vecs are not numeric types, so it doesn't make sense for them to
implement Zero.

10 years agosyntax: add #[deriving(Default)] syntax extension
Erick Tryzelaar [Thu, 12 Sep 2013 04:51:13 +0000 (21:51 -0700)]
syntax: add #[deriving(Default)] syntax extension

10 years agostd: Add a bunch of Default impls
Erick Tryzelaar [Thu, 12 Sep 2013 04:49:25 +0000 (21:49 -0700)]
std: Add a bunch of Default impls

10 years agostd: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}
Erick Tryzelaar [Wed, 11 Sep 2013 19:52:17 +0000 (12:52 -0700)]
std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}

10 years agostd: Add ToEither/IntoEither/AsEither
Erick Tryzelaar [Wed, 11 Sep 2013 16:33:45 +0000 (09:33 -0700)]
std: Add ToEither/IntoEither/AsEither

10 years agostd: Add ToResult/IntoResult/AsResult
Erick Tryzelaar [Wed, 11 Sep 2013 16:32:09 +0000 (09:32 -0700)]
std: Add ToResult/IntoResult/AsResult