]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #12339 : alexcrichton/rust/rustdoc-fixes, r=sfackler
bors [Wed, 19 Feb 2014 10:11:48 +0000 (02:11 -0800)]
auto merge of #12339 : alexcrichton/rust/rustdoc-fixes, r=sfackler

Commits have the details

10 years agorustdoc: Handle links to reexported items
Alex Crichton [Mon, 17 Feb 2014 07:11:09 +0000 (23:11 -0800)]
rustdoc: Handle links to reexported items

When building up our path cache, we don't plaster over a path which was
previously inserted if we're inserting a non-public-item thing.

Closes #11678

10 years agorustdoc: Clickable links on methods themselves
Alex Crichton [Mon, 17 Feb 2014 06:40:08 +0000 (22:40 -0800)]
rustdoc: Clickable links on methods themselves

Useful for getting the link to a method or function.

Closes #10332

10 years agorustdoc: Fix json output and input
Alex Crichton [Mon, 17 Feb 2014 06:31:05 +0000 (22:31 -0800)]
rustdoc: Fix json output and input

Turns out a hash map with integer keys isn't serializable to json.

Closes #10115

10 years agorustdoc: Highlight methods jumped to
Alex Crichton [Mon, 17 Feb 2014 05:56:14 +0000 (21:56 -0800)]
rustdoc: Highlight methods jumped to

This helps figure out where you actually jumped to, especially if the thing you
jumped to is at the very bottom of the page.

Closes #9905

10 years agorustdoc: Show macros in documentation
Alex Crichton [Mon, 17 Feb 2014 05:40:26 +0000 (21:40 -0800)]
rustdoc: Show macros in documentation

Any macro tagged with #[macro_export] will be showed in the documentation for
that module. This also documents all the existing macros inside of std::macros.

Closes #3163
cc #5605
Closes #9954

10 years agorustdoc: Fixup links to enum variants
Alex Crichton [Sun, 16 Feb 2014 22:35:13 +0000 (14:35 -0800)]
rustdoc: Fixup links to enum variants

Pages aren't emitted for enum variants, so whenever we're linking to an enum
variant instead link to the parent enum instead.

Closes #12289

10 years agoauto merge of #12364 : Armavica/rust/mk-tips, r=alexcrichton
bors [Wed, 19 Feb 2014 08:56:51 +0000 (00:56 -0800)]
auto merge of #12364 : Armavica/rust/mk-tips, r=alexcrichton

The command `make tips` did not work properly because of a flaw in the regexp parsing Makefile.in for documentation (`SHOW_DOCS`). I fixed it and also added a note about `make clean` in the build documentation (`make help`).

10 years agoauto merge of #12361 : sfackler/rust/rustdoc-test-extern, r=alexcrichton
bors [Wed, 19 Feb 2014 06:16:47 +0000 (22:16 -0800)]
auto merge of #12361 : sfackler/rust/rustdoc-test-extern, r=alexcrichton

10 years agorustdoc: Only inject extern crates if not present
Steven Fackler [Tue, 18 Feb 2014 04:43:32 +0000 (20:43 -0800)]
rustdoc: Only inject extern crates if not present

10 years agoauto merge of #12317 : huonw/rust/utf16, r=alexcrichton
bors [Wed, 19 Feb 2014 03:26:50 +0000 (19:26 -0800)]
auto merge of #12317 : huonw/rust/utf16, r=alexcrichton

Iterators! Use them (in `is_utf16`), create them (in `utf16_items`).

Handle errors gracefully (`from_utf16_lossy`) and `from_utf16` returning `Option<~str>` instead of failing.

Add a pile of tests.

10 years agostr: add a function for truncating a vector of u16 at NUL.
Huon Wilson [Tue, 18 Feb 2014 11:25:32 +0000 (22:25 +1100)]
str: add a function for truncating a vector of u16 at NUL.

Many of the functions interacting with Windows APIs allocate a vector of
0's and do not retrieve a length directly from the API call, and so need
to be sure to remove the unmodified junk at the end of the vector.

10 years agoauto merge of #12245 : nick29581/rust/priv2, r=alexcrichton
bors [Wed, 19 Feb 2014 02:11:48 +0000 (18:11 -0800)]
auto merge of #12245 : nick29581/rust/priv2, r=alexcrichton

closes #4110

10 years agoMake priavcy checking aware that a `use` directive can point to two defintions (names...
Nick Cameron [Tue, 11 Feb 2014 19:19:18 +0000 (08:19 +1300)]
Make priavcy checking aware that a `use` directive can point to two defintions (namespaces) with different privacy. Closes #4110

10 years agoauto merge of #12359 : alexcrichton/rust/update-compiler-rt, r=luqmana
bors [Tue, 18 Feb 2014 21:41:49 +0000 (13:41 -0800)]
auto merge of #12359 : alexcrichton/rust/update-compiler-rt, r=luqmana

Closes #12356

10 years agoauto merge of #12357 : chromatic/rust/gh_11976_fail_bounds_check_str, r=alexcrichton
bors [Tue, 18 Feb 2014 20:21:45 +0000 (12:21 -0800)]
auto merge of #12357 : chromatic/rust/gh_11976_fail_bounds_check_str, r=alexcrichton

Fixes #11976.

10 years agoauto merge of #12336 : kballard/rust/mutexarc-no-freeze, r=alexcrichton
bors [Tue, 18 Feb 2014 18:16:48 +0000 (10:16 -0800)]
auto merge of #12336 : kballard/rust/mutexarc-no-freeze, r=alexcrichton

With Rc no longer trying to statically prevent cycles (and thus no
longer using the Freeze bound), it seems appropriate to remove that
restriction from MutexArc as well.

Closes #9251.

10 years agoauto merge of #12330 : nick29581/rust/glue, r=huonw
bors [Tue, 18 Feb 2014 16:56:51 +0000 (08:56 -0800)]
auto merge of #12330 : nick29581/rust/glue, r=huonw

closes #3290

10 years agoauto merge of #12354 : alexcrichton/rust/fix-rustuv-segfault, r=cmr
bors [Tue, 18 Feb 2014 14:46:55 +0000 (06:46 -0800)]
auto merge of #12354 : alexcrichton/rust/fix-rustuv-segfault, r=cmr

The details can be found in the comments I added to the test, but the gist of it
is that capturing output injects rescheduling a green task on failure, which
wasn't desired for the test in question.

cc #12340

10 years agoauto merge of #12351 : kud1ing/rust/backticks, r=alexcrichton
bors [Tue, 18 Feb 2014 13:31:55 +0000 (05:31 -0800)]
auto merge of #12351 : kud1ing/rust/backticks, r=alexcrichton

10 years agoauto merge of #12314 : huonw/rust/is_utf8_iter, r=kballard
bors [Tue, 18 Feb 2014 12:06:48 +0000 (04:06 -0800)]
auto merge of #12314 : huonw/rust/is_utf8_iter, r=kballard

See the commit messages for more details, but this makes `std::str::is_utf8` slightly faster and 100% non-`unsafe` and uses a similar thing to make the first scan of `from_utf8_lossy` 100% safe & faster.

10 years agostd: convert first_non_utf8_byte to use the iterator.
Huon Wilson [Sun, 16 Feb 2014 06:12:47 +0000 (17:12 +1100)]
std: convert first_non_utf8_byte to use the iterator.

This makes it very slightly faster, especially when the string is valid
UTF-8, and completely removes the use of `unsafe` from the first half.

Before:

    from_utf8_lossy_100_ascii              ... bench:       151 ns/iter (+/- 17)
    from_utf8_lossy_100_invalid            ... bench:       447 ns/iter (+/- 33)
    from_utf8_lossy_100_multibyte          ... bench:       135 ns/iter (+/- 4)
    from_utf8_lossy_invalid                ... bench:       124 ns/iter (+/- 10

After:

    from_utf8_lossy_100_ascii              ... bench:       119 ns/iter (+/- 8)
    from_utf8_lossy_100_invalid            ... bench:       454 ns/iter (+/- 16)
    from_utf8_lossy_100_multibyte          ... bench:       116 ns/iter (+/- 9)
    from_utf8_lossy_invalid                ... bench:       119 ns/iter (+/- 9)

10 years agostd::str: safen and optimize is_utf8.
Huon Wilson [Sun, 16 Feb 2014 05:11:47 +0000 (16:11 +1100)]
std::str: safen and optimize is_utf8.

This uses a vector iterator to avoid the necessity for unsafe indexing,
and makes this function slightly faster. Unfortunately #11751 means that
the iterator comes with repeated `null` checks which means the
pure-ASCII case still has room for significant improvement (and the
other cases too, but it's most significant for just ASCII).

Before:

    is_utf8_100_ascii             ... bench:       143 ns/iter (+/- 6)
    is_utf8_100_multibyte         ... bench:       134 ns/iter (+/- 4)

After:

    is_utf8_100_ascii             ... bench:       123 ns/iter (+/- 4)
    is_utf8_100_multibyte         ... bench:       115 ns/iter (+/- 5)

10 years agomk: Talk about `make clean` in the build help
Virgile Andreani [Tue, 18 Feb 2014 10:55:34 +0000 (11:55 +0100)]
mk: Talk about `make clean` in the build help

10 years agomk: Fix the regexp of SHOW_DOCS
Virgile Andreani [Tue, 18 Feb 2014 10:53:23 +0000 (11:53 +0100)]
mk: Fix the regexp of SHOW_DOCS

The tag marks were missing, and `make tips` didn't work.

10 years agoauto merge of #12345 : huonw/rust/speeling, r=cmr
bors [Tue, 18 Feb 2014 10:51:49 +0000 (02:51 -0800)]
auto merge of #12345 : huonw/rust/speeling, r=cmr

10 years agoauto merge of #12342 : ehsanul/rust/remove-shared-chan-tasks-guide, r=alexcrichton
bors [Tue, 18 Feb 2014 09:36:51 +0000 (01:36 -0800)]
auto merge of #12342 : ehsanul/rust/remove-shared-chan-tasks-guide, r=alexcrichton

The code examples are up to date, but the surrounding explanations are not.

10 years agoauto merge of #12321 : bjz/rust/remove-real, r=alexcrichton
bors [Tue, 18 Feb 2014 06:16:51 +0000 (22:16 -0800)]
auto merge of #12321 : bjz/rust/remove-real, r=alexcrichton

This is part of the effort to simplify `std::num`, as tracked in issue #10387. It is also a step towards a proper IEEE-754 trait (see #12281).

10 years agoauto merge of #12103 : alexcrichton/rust/unix, r=brson
bors [Tue, 18 Feb 2014 04:01:52 +0000 (20:01 -0800)]
auto merge of #12103 : alexcrichton/rust/unix, r=brson

There's a few parts to this PR

* Implement unix pipes in libnative for unix platforms (thanks @Geal!)
* Implement named pipes in libnative for windows (terrible, terrible code)
* Remove `#[cfg(unix)]` from `mod unix` in `std::io::net`. This is a terrible name for what it is, but that's the topic of #12093.

The windows implementation was significantly more complicated than I thought it would be, but it seems to be passing all the tests. now.

Closes #11201

10 years agoUpdate compiler-rt
Alex Crichton [Tue, 18 Feb 2014 03:58:47 +0000 (19:58 -0800)]
Update compiler-rt

Closes #12356

10 years agoMade fail_bounds_check more careful with strings.
chromatic [Tue, 18 Feb 2014 02:38:23 +0000 (18:38 -0800)]
Made fail_bounds_check more careful with strings.

Fixes GH #11976.

10 years agoTest ordering of glue_drop and glue_takew in self-re-assignment. Closes #3290.
Nick Cameron [Sun, 16 Feb 2014 22:53:12 +0000 (11:53 +1300)]
Test ordering of glue_drop and glue_takew in self-re-assignment. Closes #3290.

10 years agoauto merge of #12243 : dguenther/rust/extend-tidy, r=alexcrichton
bors [Tue, 18 Feb 2014 02:46:48 +0000 (18:46 -0800)]
auto merge of #12243 : dguenther/rust/extend-tidy, r=alexcrichton

Extends the license and formatting check to `*.js` files in `src/doc` and `*.sh`, `*.pl`, `*.c`, and `*.h` files in `src/etc`. As best as I could tell, these files should be covered under the Rust project license.

cc @brson: Do any other scripts need a license? I'd like to double-check that this PR closes #4534.

10 years agoauto merge of #12232 : kballard/rust/taskbuilder-is-a-builder, r=alexcrichton
bors [Tue, 18 Feb 2014 01:31:52 +0000 (17:31 -0800)]
auto merge of #12232 : kballard/rust/taskbuilder-is-a-builder, r=alexcrichton

Delete all the documentation from std::task that references linked
failure.

Tweak TaskBuilder to be more builder-like. `.name()` is now `.named()` and
`.add_wrapper()` is now `.with_wrapper()`. Remove `.watched()` and
`.unwatched()` as they didn't actually do anything.

Closes #6399.

10 years agoauto merge of #12146 : gentlefolk/rust/issue-2404, r=alexcrichton
bors [Tue, 18 Feb 2014 00:11:52 +0000 (16:11 -0800)]
auto merge of #12146 : gentlefolk/rust/issue-2404, r=alexcrichton

Addresses FIXME described in issue #2404

10 years agoUpdated metadata::creader::resolve_crate_deps to use the correct span. Clarified...
gentlefolk [Mon, 10 Feb 2014 03:29:21 +0000 (22:29 -0500)]
Updated metadata::creader::resolve_crate_deps to use the correct span. Clarified error message when an external crate's dependency is missing. Closes #2404.

10 years agoFix a segfault in the rustuv tests
Alex Crichton [Mon, 17 Feb 2014 22:41:33 +0000 (14:41 -0800)]
Fix a segfault in the rustuv tests

The details can be found in the comments I added to the test, but the gist of it
is that capturing output injects rescheduling a green task on failure, which
wasn't desired for the test in question.

cc #12340

10 years agoauto merge of #12352 : alexcrichton/rust/fix-master, r=brson
bors [Mon, 17 Feb 2014 22:16:53 +0000 (14:16 -0800)]
auto merge of #12352 : alexcrichton/rust/fix-master, r=brson

This deadlock was caused when the channel was closed at just the right time, so
the extra `self.cnt.fetch_add` actually should have preserved the DISCONNECTED
state of the channel. by modifying this the channel entered a state such that
the port would never succeed in dropping.

This also moves the increment of self.steals until after the MAX_STEALS block.
The reason for this is that in 'fn recv()' the steals variable is decremented
immediately after the try_recv(), which could in theory set steals to -1 if it
was previously set to 0 in try_recv().

Closes #12340

10 years agoFix a deadlock in channels, again.
Alex Crichton [Mon, 17 Feb 2014 21:59:25 +0000 (13:59 -0800)]
Fix a deadlock in channels, again.

This deadlock was caused when the channel was closed at just the right time, so
the extra `self.cnt.fetch_add` actually should have preserved the DISCONNECTED
state of the channel. by modifying this the channel entered a state such that
the port would never succeed in dropping.

This also moves the increment of self.steals until after the MAX_STEALS block.
The reason for this is that in 'fn recv()' the steals variable is decremented
immediately after the try_recv(), which could in theory set steals to -1 if it
was previously set to 0 in try_recv().

Closes #12340

10 years agoSpellcheck library docs.
Huon Wilson [Mon, 17 Feb 2014 11:53:45 +0000 (22:53 +1100)]
Spellcheck library docs.

10 years agobackticks for syntax elements
kud1ing [Mon, 17 Feb 2014 20:48:53 +0000 (21:48 +0100)]
backticks for syntax elements

10 years agoRemove the compile-fail test that's now obsolete
Kevin Ballard [Mon, 17 Feb 2014 18:03:52 +0000 (10:03 -0800)]
Remove the compile-fail test that's now obsolete

10 years agoauto merge of #12337 : nick29581/rust/generic_extern, r=alexcrichton
bors [Mon, 17 Feb 2014 17:26:48 +0000 (09:26 -0800)]
auto merge of #12337 : nick29581/rust/generic_extern, r=alexcrichton

and fix up some formatting.

10 years agoAdded more scripts to tidy check
Derek Guenther [Thu, 13 Feb 2014 16:42:52 +0000 (10:42 -0600)]
Added more scripts to tidy check

10 years agoauto merge of #12331 : bjz/rust/count-ones, r=alexcrichton
bors [Mon, 17 Feb 2014 16:06:49 +0000 (08:06 -0800)]
auto merge of #12331 : bjz/rust/count-ones, r=alexcrichton

This is inspired by the [function naming in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones). It seems like a more self-explanatory name, and is more consistent with the accompanying methods, `leading_zeros` and `trailing_zeros`.

10 years agoauto merge of #12325 : big-guy/rust/doc-fixes, r=alexcrichton
bors [Mon, 17 Feb 2014 14:11:51 +0000 (06:11 -0800)]
auto merge of #12325 : big-guy/rust/doc-fixes, r=alexcrichton

* Change '...your own time' => '...your own type'
* Fix typo in the Vector2D example

10 years agostd: make str::from_utf16 return an Option.
Huon Wilson [Sun, 16 Feb 2014 22:57:56 +0000 (09:57 +1100)]
std: make str::from_utf16 return an Option.

The rest of the codebase is moving toward avoiding `fail!` so we do it
here too!

10 years agostd: decode even numbered non-BMP planes in the UTF-16 decoder.
Huon Wilson [Sun, 16 Feb 2014 13:57:16 +0000 (00:57 +1100)]
std: decode even numbered non-BMP planes in the UTF-16 decoder.

Fixes #12318.

10 years agostr: provide lossy UTF-16 support.
Huon Wilson [Sun, 16 Feb 2014 13:52:58 +0000 (00:52 +1100)]
str: provide lossy UTF-16 support.

This replaces the iterator with one that handles lone surrogates
gracefully and uses that to implement `from_utf16_lossy` which replaces
invalid `u16`s with U+FFFD.

10 years agostd: convert str::from_utf16 to an external iterator.
Huon Wilson [Sun, 16 Feb 2014 13:09:45 +0000 (00:09 +1100)]
std: convert str::from_utf16 to an external iterator.

Fixes #12316.

10 years agostd: iteratize str::is_utf16 & add tests.
Huon Wilson [Sun, 16 Feb 2014 12:52:14 +0000 (23:52 +1100)]
std: iteratize str::is_utf16 & add tests.

Most of the tests are randomly generated with Python 3 and rely on it's
UTF-16be encoder/decoder being correct.

10 years agoauto merge of #12284 : brson/rust/install, r=alexcrichton
bors [Mon, 17 Feb 2014 11:26:51 +0000 (03:26 -0800)]
auto merge of #12284 : brson/rust/install, r=alexcrichton

Work toward #9876.

This adds `prepare.mk`, which is simply a more heavily-parameterized `install.mk`, then uses `prepare` to implement both `install` and the windows installer (`dist`). Smoke tested on both Linux and Windows.

10 years agoUpdate tasks guide: SharedChan as been removed
Ehsanul Hoque [Mon, 17 Feb 2014 10:32:30 +0000 (02:32 -0800)]
Update tasks guide: SharedChan as been removed

The code examples are up to date, but the surrounding explanations are not.

10 years agoForbid use of generics with foreign functions. Closes #10353.
Nick Cameron [Mon, 17 Feb 2014 05:52:11 +0000 (18:52 +1300)]
Forbid use of generics with foreign functions. Closes #10353.

10 years agoRemove Freeze bounds from sync::MutexArc
Kevin Ballard [Mon, 17 Feb 2014 04:23:05 +0000 (20:23 -0800)]
Remove Freeze bounds from sync::MutexArc

With Rc no longer trying to statically prevent cycles (and thus no
longer using the Freeze bound), it seems appropriate to remove that
restriction from MutexArc as well.

10 years agoRename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros
Brendan Zabarauskas [Sun, 16 Feb 2014 23:12:10 +0000 (10:12 +1100)]
Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros

These are inspired by the [functions in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones).

10 years agoImplement named pipes for windows, touch up unix
Alex Crichton [Fri, 7 Feb 2014 18:37:58 +0000 (10:37 -0800)]
Implement named pipes for windows, touch up unix

* Implementation of pipe_win32 filled out for libnative
* Reorganize pipes to be clone-able
* Fix a few file descriptor leaks on error
* Factor out some common code into shared functions
* Make use of the if_ok!() macro for less indentation

Closes #11201

10 years agoMove unix pipes implementation to pipe_unix.rs
Alex Crichton [Fri, 7 Feb 2014 18:10:48 +0000 (10:10 -0800)]
Move unix pipes implementation to pipe_unix.rs

The windows named pipes implementation will have almost nothing to do with unix
pipes, so I think it's best if they live in separate files.

10 years agoImplement Unix domain sockets in libnative
Geoffroy Couprie [Thu, 16 Jan 2014 15:56:21 +0000 (16:56 +0100)]
Implement Unix domain sockets in libnative

10 years agoAddress review feedback
Brian Anderson [Sun, 16 Feb 2014 05:47:28 +0000 (21:47 -0800)]
Address review feedback

10 years agoauto merge of #12085 : alexcrichton/rust/issue-12082, r=brson
bors [Mon, 17 Feb 2014 00:46:39 +0000 (16:46 -0800)]
auto merge of #12085 : alexcrichton/rust/issue-12082, r=brson

This just copies the libuv implementation for libnative which seems reasonable
enough (uid/gid fail on windows).

Closes #12082

10 years agoUpgrade libuv
Alex Crichton [Sun, 16 Feb 2014 20:57:40 +0000 (12:57 -0800)]
Upgrade libuv

This notably includes joyent/libuv@6f62d62c in order to fix when processes fail
to spawn on windows

10 years agoAllow configuration of uid/gid/detach on processes
Alex Crichton [Fri, 7 Feb 2014 06:38:05 +0000 (22:38 -0800)]
Allow configuration of uid/gid/detach on processes

This just copies the libuv implementation for libnative which seems reasonable
enough (uid/gid fail on windows).

Closes #12082

10 years agoUpdate clients of the TaskBuilder API
Kevin Ballard [Thu, 13 Feb 2014 06:03:36 +0000 (22:03 -0800)]
Update clients of the TaskBuilder API

10 years agoClean up std::task docs, make TaskBuilder a real builder
Kevin Ballard [Thu, 13 Feb 2014 06:02:09 +0000 (22:02 -0800)]
Clean up std::task docs, make TaskBuilder a real builder

Delete all the documentation from std::task that references linked
failure.

Tweak TaskBuilder to be more builder-like. .name() is now .named() and
.add_wrapper() is now .with_wrapper(). Remove .watched() and
.unwatched() as they didn't actually do anything.

10 years agoauto merge of #12319 : SimonSapin/rust/build-symlink, r=alexcrichton
bors [Sun, 16 Feb 2014 20:51:40 +0000 (12:51 -0800)]
auto merge of #12319 : SimonSapin/rust/build-symlink, r=alexcrichton

10 years agoauto merge of #12312 : brson/rust/doc, r=alexcrichton
bors [Sun, 16 Feb 2014 19:36:40 +0000 (11:36 -0800)]
auto merge of #12312 : brson/rust/doc, r=alexcrichton

Only single out std. Put everything else in a consistent list.

10 years agoMinor documentation fixes in std::fmt
Sterling Greene [Sun, 16 Feb 2014 18:02:43 +0000 (13:02 -0500)]
Minor documentation fixes in std::fmt

* Change '...your own time' => '...your own type'
* Fix typo in the Vector2D example

10 years agoRemove Real trait and move methods into Float
Brendan Zabarauskas [Sun, 16 Feb 2014 15:23:33 +0000 (02:23 +1100)]
Remove Real trait and move methods into Float

This is part of the effort to simplify `std::num`, as tracked in issue #10387.

10 years agoauto merge of #12313 : bjz/rust/tuple, r=huonw
bors [Sun, 16 Feb 2014 15:11:34 +0000 (07:11 -0800)]
auto merge of #12313 : bjz/rust/tuple, r=huonw

This renames the `n*` and `n*_ref` tuple getters to `val*` and `ref*` respectively, and adds `mut*` getters. It also removes the `CloneableTuple` and `ImmutableTuple` traits.

10 years agoRemove CloneableTuple and ImmutableTuple traits
Brendan Zabarauskas [Sun, 16 Feb 2014 09:36:43 +0000 (20:36 +1100)]
Remove CloneableTuple and ImmutableTuple traits

These are adequately covered by the Tuple2 trait.

10 years agoImprove naming of tuple getters, and add mutable tuple getter
Brendan Zabarauskas [Sun, 16 Feb 2014 11:19:41 +0000 (22:19 +1100)]
Improve naming of tuple getters, and add mutable tuple getter

Renames the `n*` and `n*_ref` tuple getters to `val*` and `ref*` respectively, and adds `mut*` getters.

10 years agoIgnore /build even if it’s a symlink.
Simon Sapin [Sun, 16 Feb 2014 12:41:41 +0000 (12:41 +0000)]
Ignore /build even if it’s a symlink.

10 years agoMerge ImmutableTuple* traits into their respective Tuple* trait
Brendan Zabarauskas [Sun, 16 Feb 2014 09:25:28 +0000 (20:25 +1100)]
Merge ImmutableTuple* traits into their respective Tuple* trait

10 years agoauto merge of #12310 : brson/rust/mkfilecleanup, r=sfackler
bors [Sun, 16 Feb 2014 08:51:33 +0000 (00:51 -0800)]
auto merge of #12310 : brson/rust/mkfilecleanup, r=sfackler

Two small fixes

10 years agodoc: Reorganize the library index
Brian Anderson [Sun, 16 Feb 2014 08:21:08 +0000 (00:21 -0800)]
doc: Reorganize the library index

Only single out std. Put everything else in a consistent list.

10 years agoDelegate ToStr implementation to Show for tuples
Brendan Zabarauskas [Sun, 16 Feb 2014 07:27:46 +0000 (18:27 +1100)]
Delegate ToStr implementation to Show for tuples

10 years agoImplement Show for 1-12 element tuples
Brendan Zabarauskas [Fri, 14 Feb 2014 14:20:43 +0000 (01:20 +1100)]
Implement Show for 1-12 element tuples

10 years agoauto merge of #12302 : alexcrichton/rust/issue-12295, r=brson
bors [Sun, 16 Feb 2014 07:36:26 +0000 (23:36 -0800)]
auto merge of #12302 : alexcrichton/rust/issue-12295, r=brson

The previous code erroneously assumed that 'steals > cnt' was always true, but
that was a false assumption. The code was altered to decrement steals to a
minimum of 0 instead of taking all of cnt into account.

I didn't include the exact test from #12295 because it could run for quite
awhile, and instead set the threshold for MAX_STEALS to much lower during
testing. I found that this triggered the old bug quite frequently when running
without this fix.

Closes #12295

10 years agomk: Fix typo, NO_MAKEFILE_DEPS -> NO_MKFILE_DEPS
Brian Anderson [Sun, 16 Feb 2014 07:12:56 +0000 (23:12 -0800)]
mk: Fix typo, NO_MAKEFILE_DEPS -> NO_MKFILE_DEPS

10 years agomk: Remove check-notidy, check-full, check-test
Brian Anderson [Sun, 16 Feb 2014 07:11:54 +0000 (23:11 -0800)]
mk: Remove check-notidy, check-full, check-test

Mostly useless

10 years agoauto merge of #12301 : FlaPer87/rust/issue-8893, r=alexcrichton
bors [Sun, 16 Feb 2014 06:06:27 +0000 (22:06 -0800)]
auto merge of #12301 : FlaPer87/rust/issue-8893, r=alexcrichton

10 years agoauto merge of #12305 : luqmana/rust/ub, r=sfackler
bors [Sun, 16 Feb 2014 04:46:26 +0000 (20:46 -0800)]
auto merge of #12305 : luqmana/rust/ub, r=sfackler

These are no longer valid options as of the recent llvm upgrade.

10 years agoauto merge of #12299 : sfackler/rust/limit-return, r=alexcrichton
bors [Sun, 16 Feb 2014 02:56:29 +0000 (18:56 -0800)]
auto merge of #12299 : sfackler/rust/limit-return, r=alexcrichton

This is useful in contexts like this:

```rust
let size = rdr.read_be_i32() as uint;
let mut limit = LimitReader::new(rdr.by_ref(), size);
let thing = read_a_thing(&mut limit);
assert!(limit.limit() == 0);
```

10 years agomk: Remove old flags to llc for arm.
Luqman Aden [Sun, 16 Feb 2014 01:08:33 +0000 (20:08 -0500)]
mk: Remove old flags to llc for arm.

10 years agoauto merge of #12298 : alexcrichton/rust/rustdoc-testing, r=sfackler
bors [Sun, 16 Feb 2014 00:36:27 +0000 (16:36 -0800)]
auto merge of #12298 : alexcrichton/rust/rustdoc-testing, r=sfackler

It's too easy to forget the `rust` tag to test something.

Closes #11698

10 years agoCorrectly reset steals when hitting MAX_STEALS
Alex Crichton [Sat, 15 Feb 2014 23:54:29 +0000 (15:54 -0800)]
Correctly reset steals when hitting MAX_STEALS

The previous code erroneously assumed that 'steals > cnt' was always true, but
that was a false assumption. The code was altered to decrement steals to a
minimum of 0 instead of taking all of cnt into account.

I didn't include the exact test from #12295 because it could run for quite
awhile, and instead set the threshold for MAX_STEALS to much lower during
testing. I found that this triggered the old bug quite frequently when running
without this fix.

Closes #12295

10 years agoSilence some unused import warnings
Alex Crichton [Sat, 15 Feb 2014 23:53:52 +0000 (15:53 -0800)]
Silence some unused import warnings

10 years agoauto merge of #12235 : huonw/rust/raii-lock, r=alexcrichton
bors [Sat, 15 Feb 2014 23:21:28 +0000 (15:21 -0800)]
auto merge of #12235 : huonw/rust/raii-lock, r=alexcrichton

- adds a `LockGuard` type returned by `.lock` and `.trylock` that unlocks the mutex in the destructor
- renames `mutex::Mutex` to `StaticNativeMutex`
- adds a `NativeMutex` type with a destructor
- removes `LittleLock`
- adds `#[must_use]` to `sync::mutex::Guard` to remind people to use it

10 years agoConvert some unnecessary StaticNativeMutexes to NativeMutexes.
Huon Wilson [Sat, 15 Feb 2014 04:01:00 +0000 (15:01 +1100)]
Convert some unnecessary StaticNativeMutexes to NativeMutexes.

10 years agostd::unstable::mutex: streamline & clarify documentation.
Huon Wilson [Sat, 15 Feb 2014 03:24:51 +0000 (14:24 +1100)]
std::unstable::mutex: streamline & clarify documentation.

10 years agosync: Add `#[must_use]` to the Mutex guard.
Huon Wilson [Sat, 15 Feb 2014 01:53:23 +0000 (12:53 +1100)]
sync: Add `#[must_use]` to the Mutex guard.

This helps people remember to save the return value to keep the mutex
locked as appropriate.

10 years agostd: add a NativeMutex type as a wrapper to destroy StaticNativeMutex.
Huon Wilson [Sat, 15 Feb 2014 01:01:52 +0000 (12:01 +1100)]
std: add a NativeMutex type as a wrapper to destroy StaticNativeMutex.

This obsoletes LittleLock, and so it is removed.

10 years agostd: Rename unstable::mutex::Mutex to StaticNativeMutex.
Huon Wilson [Sat, 15 Feb 2014 00:18:49 +0000 (11:18 +1100)]
std: Rename unstable::mutex::Mutex to StaticNativeMutex.

This better reflects its purpose and design.

10 years agostd: add tests for the _noguard lock/signal/wait methods on Mutex.
Huon Wilson [Thu, 13 Feb 2014 08:29:13 +0000 (19:29 +1100)]
std: add tests for the _noguard lock/signal/wait methods on Mutex.

10 years agostd: add an RAII unlocker to Mutex.
Huon Wilson [Thu, 13 Feb 2014 06:17:50 +0000 (17:17 +1100)]
std: add an RAII unlocker to Mutex.

This automatically unlocks its lock when it goes out of scope, and
provides a safe(ish) method to call .wait.

10 years agoAdd test and close #8893
Flavio Percoco [Sat, 15 Feb 2014 23:00:38 +0000 (00:00 +0100)]
Add test and close #8893

10 years agoAdd a method to LimitReader to return the limit
Steven Fackler [Sat, 15 Feb 2014 21:51:37 +0000 (13:51 -0800)]
Add a method to LimitReader to return the limit

This is useful in contexts like this:

let size = rdr.read_be_i32() as uint;
let mut limit = LimitReader::new(rdr.by_ref(), size);
let thing = read_a_thing(&mut limit);
assert!(limit.limit() == 0);

10 years agomk: Base the windows dist target on prepare.mk
Brian Anderson [Thu, 13 Feb 2014 08:22:18 +0000 (00:22 -0800)]
mk: Base the windows dist target on prepare.mk

10 years agomk: Fix a dist bug
Brian Anderson [Sat, 15 Feb 2014 03:36:56 +0000 (19:36 -0800)]
mk: Fix a dist bug

Fallout from moving doc/ to src/doc