]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoAuto merge of #25159 - inrustwetrust:wrapping_inline, r=alexcrichton
bors [Sat, 9 May 2015 03:55:27 +0000 (03:55 +0000)]
Auto merge of #25159 - inrustwetrust:wrapping_inline, r=alexcrichton

This was causing function calls to be emitted for bitwise complements, even with optimizations on.
Steps to reproduce:
```
$ cat wrapping.rs
fn main() {
    let a = std::num::Wrapping(std::env::args().len() as u32);
    let b = !a;
    println!("{}", b.0);
}
$ rustc -O wrapping.rs --emit=asm,link
$ grep Not wrapping.s
        callq   _ZN3num8wrapping23Wrapping$LT$u32$GT$.Not3not20hba4b266232e02b1dHkbE
```

9 years agoAuto merge of #24859 - richo:valgrind-tests, r=brson
bors [Sat, 9 May 2015 02:07:18 +0000 (02:07 +0000)]
Auto merge of #24859 - richo:valgrind-tests, r=brson

This stung me more than once in dev.

Bonus DRY'ing up of configure that I did on my way past.

9 years agoAuto merge of #25162 - seanmonstar:asref-bytes, r=alexcrichton
bors [Sat, 9 May 2015 00:18:49 +0000 (00:18 +0000)]
Auto merge of #25162 - seanmonstar:asref-bytes, r=alexcrichton

r? @aturon

9 years agocollections: change bounds of SliceConcatExt implementations to use Borrow instead...
Sean McArthur [Sat, 9 May 2015 00:13:35 +0000 (17:13 -0700)]
collections: change bounds of SliceConcatExt implementations to use Borrow instead of AsRef

9 years agocollections: impl AsRef<[u8]> for String
Sean McArthur [Wed, 6 May 2015 22:53:53 +0000 (15:53 -0700)]
collections: impl AsRef<[u8]> for String

9 years agocore: impl AsRef<[u8]> for str
Sean McArthur [Wed, 6 May 2015 22:53:34 +0000 (15:53 -0700)]
core: impl AsRef<[u8]> for str

9 years agoAuto merge of #25217 - alexcrichton:fix-distcheck, r=brson
bors [Fri, 8 May 2015 22:29:05 +0000 (22:29 +0000)]
Auto merge of #25217 - alexcrichton:fix-distcheck, r=brson

This fixes the `distcheck` target and nightly builds.

9 years agoAuto merge of #25218 - Manishearth:rollup, r=Manishearth
bors [Fri, 8 May 2015 20:39:08 +0000 (20:39 +0000)]
Auto merge of #25218 - Manishearth:rollup, r=Manishearth

- Successful merges: #24864, #25140, #25179, #25181, #25190, #25194, #25195, #25198, #25203, #25210, #25211, #25215
- Failed merges: #25200

9 years agoRollup merge of #25215 - acgtyrant:patch-2, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:45 +0000 (00:37 +0530)]
Rollup merge of #25215 - acgtyrant:patch-2, r=alexcrichton

Fix wrong radius valve from 0.0 to 1.0 as above

9 years agoRollup merge of #25211 - huonw:libc, r=cmr
Manish Goregaokar [Fri, 8 May 2015 19:07:45 +0000 (00:37 +0530)]
Rollup merge of #25211 - huonw:libc, r=cmr

Many many many people ask in #rust about this libraries, having an
explanatory reason will probably help a lot.

9 years agoRollup merge of #25210 - rick68:patch-1, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:44 +0000 (00:37 +0530)]
Rollup merge of #25210 - rick68:patch-1, r=alexcrichton

fixed a doc mistake in libcore/marker.mk

9 years agoRollup merge of #25203 - sharnik:fix-sort-authors, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:44 +0000 (00:37 +0530)]
Rollup merge of #25203 - sharnik:fix-sort-authors, r=alexcrichton

Properly sorted, Ł goes between L and M.

9 years agoRollup merge of #25198 - carols10cents:update-configure-osx, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:43 +0000 (00:37 +0530)]
Rollup merge of #25198 - carols10cents:update-configure-osx, r=alexcrichton

Tiny tiny nitpick that I just noticed after getting a new laptop ( :beer: + :computer: = :angel: ) and thus needing to ./configure anew on Yosemite.

It's weird to see a message that says you're on 10.9 if you're on 10.10, in a oh-i-wonder-what-else-is-wrong sort of sense-- easy fix with a `>=` since `gcc --version` on 10.10 with the newest xcode still says it's clang.

:heart:

9 years agoRollup merge of #25195 - simonkern:master, r=steveklabnik
Manish Goregaokar [Fri, 8 May 2015 19:07:43 +0000 (00:37 +0530)]
Rollup merge of #25195 - simonkern:master, r=steveklabnik

I deleted one unneccessary 'the' and added the href for [bindings]

9 years agoRollup merge of #25194 - tshepang:assert-convention, r=steveklabnik
Manish Goregaokar [Fri, 8 May 2015 19:07:43 +0000 (00:37 +0530)]
Rollup merge of #25194 - tshepang:assert-convention, r=steveklabnik

… compared

9 years agoRollup merge of #25190 - nham:E0046_E0054, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:43 +0000 (00:37 +0530)]
Rollup merge of #25190 - nham:E0046_E0054, r=alexcrichton

cc #24407

9 years agoRollup merge of #25181 - steveklabnik:fix_curlies, r=alexcrichton
Manish Goregaokar [Fri, 8 May 2015 19:07:43 +0000 (00:37 +0530)]
Rollup merge of #25181 - steveklabnik:fix_curlies, r=alexcrichton

9 years agoRollup merge of #25179 - bengesoff:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 8 May 2015 19:07:42 +0000 (00:37 +0530)]
Rollup merge of #25179 - bengesoff:patch-1, r=steveklabnik

Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""

9 years agoRollup merge of #25140 - kevinmehall:mips, r=steveklabnik
Manish Goregaokar [Fri, 8 May 2015 19:07:42 +0000 (00:37 +0530)]
Rollup merge of #25140 - kevinmehall:mips, r=steveklabnik

Building with `--target=mipsel-unknown-linux-gnu` currently results in the following errors, fixed by this PR:

```
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/mipsel-unknown-linux-gnu/lib/libstd
/vol/rust/src/libstd/os/linux/raw.rs:76:21: 76:28 error: use of undeclared type name `c_ulong`
/vol/rust/src/libstd/os/linux/raw.rs:76         pub st_dev: c_ulong,
                                                            ^~~~~~~
/vol/rust/src/libstd/os/linux/raw.rs:83:22: 83:29 error: use of undeclared type name `c_ulong`
/vol/rust/src/libstd/os/linux/raw.rs:83         pub st_rdev: c_ulong,
                                                             ^~~~~~~
/vol/rust/src/libstd/sys/common/net2.rs:210:52: 210:70 error: unresolved name `libc::TCP_KEEPIDLE`
/vol/rust/src/libstd/sys/common/net2.rs:210         setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE,
```

9 years agoRollup merge of #24864 - astraw:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 8 May 2015 19:07:42 +0000 (00:37 +0530)]
Rollup merge of #24864 - astraw:patch-1, r=steveklabnik

If you have 0 references (`&T`) to a resource, presumably, you could have a mutable reference (`&mut T`). So this only start to make sense at having 1 reference to a resource.

9 years agoAuto merge of #25187 - alexcrichton:mem-forget-safe, r=brson
bors [Fri, 8 May 2015 18:21:51 +0000 (18:21 +0000)]
Auto merge of #25187 - alexcrichton:mem-forget-safe, r=brson

This commit is an implementation of [RFC 1066][rfc] where the conclusion was
that leaking a value is a safe operation in Rust code, so updating the signature
of this function follows suit.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1066-safe-mem-forget.md

Closes #25186

9 years agomk: Log that valgrind tests are disabled
Richo Healey [Fri, 8 May 2015 17:47:28 +0000 (10:47 -0700)]
mk: Log that valgrind tests are disabled

9 years agomk: Add a missing folder to the dist directory
Alex Crichton [Fri, 8 May 2015 16:45:16 +0000 (09:45 -0700)]
mk: Add a missing folder to the dist directory

This fixes the `distcheck` target and nightly builds.

9 years agoUpdate method-syntax.md
Isaac Ge [Fri, 8 May 2015 14:39:25 +0000 (22:39 +0800)]
Update method-syntax.md

Fix wrong radius valve from 0.0 to 1.0 as above

9 years agoAdd a reason to the libc & rand instability.
Huon Wilson [Fri, 8 May 2015 13:19:06 +0000 (23:19 +1000)]
Add a reason to the libc & rand instability.

Many many many people ask in #rust about this libraries, having an
explanatory reason will probably help a lot.

9 years agofixed a mistake
Wei-Ming Yang [Fri, 8 May 2015 12:44:11 +0000 (20:44 +0800)]
fixed a mistake

9 years agoFix sort in AUTHORS.txt
Wojciech Ogrodowczyk [Fri, 8 May 2015 05:38:18 +0000 (07:38 +0200)]
Fix sort in AUTHORS.txt

Properly sorted, Ł goes between L and M.

9 years agofix logic when describing kinds of borrows
Andrew Straw [Mon, 27 Apr 2015 11:18:26 +0000 (07:18 -0400)]
fix logic when describing kinds of borrows

If you have 0 references (`&T`) to a resource, presumably, you could
have a mutable reference (`&mut T`). So this only start to make sense
at having 1 reference to a resource.

9 years agoAuto merge of #25136 - alexcrichton:drop-the-two, r=aturon
bors [Fri, 8 May 2015 01:32:59 +0000 (01:32 +0000)]
Auto merge of #25136 - alexcrichton:drop-the-two, r=aturon

* Remove the 2-suffix from some modules
* Remove some unused files
* Remove double-boxing for `ReentrantMutex`

9 years agostd: Mark `mem::forget` as a safe function
Alex Crichton [Thu, 7 May 2015 17:49:39 +0000 (10:49 -0700)]
std: Mark `mem::forget` as a safe function

This commit is an implementation of [RFC 1066][rfc] where the conclusion was
that leaking a value is a safe operation in Rust code, so updating the signature
of this function follows suit.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1066-safe-mem-forget.md

Closes #25186

9 years agofixed href for structs
Simon Kern [Thu, 7 May 2015 23:46:26 +0000 (01:46 +0200)]
fixed href for structs

9 years agov2 gets a copy of the pointer, not a copy of the data
Simon Kern [Thu, 7 May 2015 23:43:18 +0000 (01:43 +0200)]
v2 gets a copy of the pointer, not a copy of the data

9 years agoAuto merge of #25123 - arielb1:self-inhibiting-error, r=nikomatsakis
bors [Thu, 7 May 2015 23:40:55 +0000 (23:40 +0000)]
Auto merge of #25123 - arielb1:self-inhibiting-error, r=nikomatsakis

Fix #25076.

r? @nikomatsakis

9 years agoExpand OS X versions referenced in configure message
Carol Nichols [Thu, 7 May 2015 23:11:18 +0000 (19:11 -0400)]
Expand OS X versions referenced in configure message

10.10 is out, so it's weird to see a message that says you're on 10.9.
Change the message to be >=10.9.

9 years agodeleted unnecessary `the`
Simon Kern [Thu, 7 May 2015 22:59:45 +0000 (00:59 +0200)]
deleted unnecessary `the`

9 years agotwo minor fixes
Simon Kern [Thu, 7 May 2015 22:42:10 +0000 (00:42 +0200)]
two minor fixes

9 years agodoc: the prevailing convention is to use assert_eq! when 2 values are compared
Tshepang Lekhonkhobe [Thu, 7 May 2015 22:14:00 +0000 (00:14 +0200)]
doc: the prevailing convention is to use assert_eq! when 2 values are compared

9 years agoAuto merge of #25157 - alexcrichton:remove-vec-add, r=aturon
bors [Thu, 7 May 2015 21:45:11 +0000 (21:45 +0000)]
Auto merge of #25157 - alexcrichton:remove-vec-add, r=aturon

Ideally this trait implementation would be unstable, requiring crates to opt-in
if they would like the functionality, but that's not currently how stability
works so the implementation needs to be removed entirely.

This may come back at a future date, but for now the conservative option is to
remove it.

[breaking-change]

9 years agoAdd long diagnostic for E0054
Nick Hamann [Thu, 7 May 2015 19:34:54 +0000 (14:34 -0500)]
Add long diagnostic for E0054

9 years agoAdd long diagnostic for E0046
Nick Hamann [Thu, 7 May 2015 18:08:59 +0000 (13:08 -0500)]
Add long diagnostic for E0046

9 years agoAuto merge of #24973 - roryokane:fix-minus-doc-buttons, r=alexcrichton
bors [Thu, 7 May 2015 17:19:33 +0000 (17:19 +0000)]
Auto merge of #24973 - roryokane:fix-minus-doc-buttons, r=alexcrichton

My change in #24797 had a bug, described in that issue’s comments, and first discovered in issue #24918. This fixes it.

I tested this new `main.js` by changing the `main.js` content of [a rendered docs page](https://doc.rust-lang.org/std/option/) to this new content. The ‘[−]’ button worked again.

I am also including another related fix, because it would require manual merging if I made a separate pull request for it. The page-global ‘[−]’ button currently adds `#` to the end of the URL whenever it is clicked. I am changing its `href` from `#` to `javascript:void(0)` (the same as the `href` for section-specific ‘[−]’ links) to fix that.

9 years agostd: Remove a double-box in ReentrantMutex
Alex Crichton [Tue, 5 May 2015 23:44:28 +0000 (16:44 -0700)]
std: Remove a double-box in ReentrantMutex

Perform unsafe initialization up front and then only afterward the mutex is in
place do we initialize it.

9 years agostd: Remove unused helper_thread.rs file
Alex Crichton [Tue, 5 May 2015 23:39:46 +0000 (16:39 -0700)]
std: Remove unused helper_thread.rs file

This module has been removed for quite some time!

9 years agostd: Rename sys::foo2 modules to sys::foo
Alex Crichton [Tue, 5 May 2015 23:35:15 +0000 (16:35 -0700)]
std: Rename sys::foo2 modules to sys::foo

Now that `std::old_io` has been removed for quite some time the naming real
estate here has opened up to allow these modules to move back to their proper
names.

9 years agoAuto merge of #25013 - pnkfelix:span_to_lines-oflo, r=huonw
bors [Thu, 7 May 2015 15:25:09 +0000 (15:25 +0000)]
Auto merge of #25013 - pnkfelix:span_to_lines-oflo, r=huonw

Guard against overflow in `codemap::span_to_lines`.

(Revised/expanded version of PR #24976)

Make `span_to_lines` to return a `Result`.

In `diagnostic`, catch `Err` from `span_to_lines` and print `"(unprintable span)"` instead.

----

There a number of recent issues that report the bug here.  See e.g. #24761 and #24954.

This change *might* fix them. However, that is *not* its main goal. The main goals are:

 1. Make it possible for callers to recover from an error here, and

 2. Insert a more conservative check, in that we are also checking that the files match up.

----

As a drive-by, fix #24997 , which was causing my attempts to `make check-stage1` on an `--enable-debug` build to fail.

9 years agoUndid changes involving misunderstanding of 0.3.x
Ben Gesoff [Thu, 7 May 2015 14:36:47 +0000 (15:36 +0100)]
Undid changes involving misunderstanding of 0.3.x

Didn't realise 0.3.0 referred to all 0.3.x versions! Fixed my mistakes. Should have just updated the Cargo.toml now.

9 years agoFix incorrect curly quotes
Steve Klabnik [Thu, 7 May 2015 14:26:00 +0000 (10:26 -0400)]
Fix incorrect curly quotes

9 years agoRefactor to keep rand version 0.3.0
Ben Gesoff [Thu, 7 May 2015 13:48:44 +0000 (14:48 +0100)]
Refactor to keep rand version 0.3.0

changed paragraphs with discussion of Cargo.lock file to agree with rand version 0.3.0 in the Cargo.tom file.

9 years agoAuto merge of #25161 - jooert:moretests, r=alexcrichton
bors [Thu, 7 May 2015 13:33:33 +0000 (13:33 +0000)]
Auto merge of #25161 - jooert:moretests, r=alexcrichton

The last one (at least for the moment :smiley:).

r? @alexcrichton

9 years agoChange rand version to '*'
Ben Gesoff [Thu, 7 May 2015 13:23:05 +0000 (14:23 +0100)]
Change rand version to '*'

Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""

9 years agofix test
Ariel Ben-Yehuda [Thu, 7 May 2015 13:19:43 +0000 (16:19 +0300)]
fix test

9 years agoAuto merge of #25175 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 7 May 2015 10:21:19 +0000 (10:21 +0000)]
Auto merge of #25175 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #24576, #24966, #25052, #25131, #25137, #25138, #25139, #25141, #25142, #25144, #25146, #25148, #25154, #25156, #25160, #25173
- Failed merges:

9 years agoRollup merge of #25173 - andreastt:guessing_game_syntax_fix, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:05 +0000 (12:21 +0200)]
Rollup merge of #25173 - andreastt:guessing_game_syntax_fix, r=steveklabnik

9 years agoRollup merge of #25160 - michaelwu:remove-schedule_free_slice, r=cmr
Steve Klabnik [Thu, 7 May 2015 10:21:05 +0000 (12:21 +0200)]
Rollup merge of #25160 - michaelwu:remove-schedule_free_slice, r=cmr

Nothing uses it anymore.

9 years agoRollup merge of #25156 - rydotyosh:patch-4, r=alexcrichton
Steve Klabnik [Thu, 7 May 2015 10:21:04 +0000 (12:21 +0200)]
Rollup merge of #25156 - rydotyosh:patch-4, r=alexcrichton

Remove printing of secret number at final source.

9 years agoRollup merge of #25154 - rydotyosh:patch-3, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:04 +0000 (12:21 +0200)]
Rollup merge of #25154 - rydotyosh:patch-3, r=steveklabnik

Edit version of #25150.
This commit depends on #25148.

9 years agoRollup merge of #25148 - banks:master, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:04 +0000 (12:21 +0200)]
Rollup merge of #25148 - banks:master, r=steveklabnik

Let me know if I didn't follow correct procedure - seems a trivial change and no one that can be automatically tested.

9 years agoRollup merge of #25146 - piatra:doc-search-patch, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:04 +0000 (12:21 +0200)]
Rollup merge of #25146 - piatra:doc-search-patch, r=steveklabnik

I noticed this feature added in https://github.com/rust-lang/rust/pull/23289 was missing from the `Search tricks`. Thanks!

r? @steveklabnik

9 years agoRollup merge of #25144 - killercup:docs/iter-fold-reduce, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:03 +0000 (12:21 +0200)]
Rollup merge of #25144 - killercup:docs/iter-fold-reduce, r=steveklabnik

Enhance Google-ability of `.fold()` by mentioning 'reduce' and 'inject' in the docs.

Motivation: [This thread on users.rust-lang.org](https://users.rust-lang.org/t/find-the-shortest-string-in-a-vector/1247)

9 years agoRollup merge of #25142 - rydotyosh:patch-1, r=alexcrichton
Steve Klabnik [Thu, 7 May 2015 10:21:03 +0000 (12:21 +0200)]
Rollup merge of #25142 - rydotyosh:patch-1, r=alexcrichton

9 years agoRollup merge of #25141 - steveklabnik:fix_guessing_game, r=huonw
Steve Klabnik [Thu, 7 May 2015 10:21:03 +0000 (12:21 +0200)]
Rollup merge of #25141 - steveklabnik:fix_guessing_game, r=huonw

https://github.com/rust-lang/rust/pull/25080/files#r29634986

r? @huonw

9 years agoRollup merge of #25139 - hibariya:fix-indentation, r=alexcrichton
Steve Klabnik [Thu, 7 May 2015 10:21:03 +0000 (12:21 +0200)]
Rollup merge of #25139 - hibariya:fix-indentation, r=alexcrichton

9 years agoRollup merge of #25138 - tshepang:typos, r=sanxiyn
Steve Klabnik [Thu, 7 May 2015 10:21:02 +0000 (12:21 +0200)]
Rollup merge of #25138 - tshepang:typos, r=sanxiyn

9 years agoRollup merge of #25137 - carols10cents:fix-token-declaration, r=alexcrichton
Steve Klabnik [Thu, 7 May 2015 10:21:02 +0000 (12:21 +0200)]
Rollup merge of #25137 - carols10cents:fix-token-declaration, r=alexcrichton

I know this is the most trivial thing since it's *just* the model lexer, not the real lexer, but [it is simpler to read](https://github.com/rust-lang/rust/issues/15883#issuecomment-72906431) and it'd be great if it was up to date but [it's been rotting](https://github.com/rust-lang/rust/issues/22379) and this is a tiny bit of that.

Thanks!!!!!!

9 years agoRollup merge of #25131 - janne:patch-1, r=alexcrichton
Steve Klabnik [Thu, 7 May 2015 10:21:02 +0000 (12:21 +0200)]
Rollup merge of #25131 - janne:patch-1, r=alexcrichton

9 years agoRollup merge of #25052 - jooert:misc_attr_reference, r=steveklabnik
Steve Klabnik [Thu, 7 May 2015 10:21:02 +0000 (12:21 +0200)]
Rollup merge of #25052 - jooert:misc_attr_reference, r=steveklabnik

Unsafe destructors were removed, added remarks about needed feature gates.

cc #16676
r? @steveklabnik

9 years agoRollup merge of #24966 - ruud-v-a:explain, r=pnkfelix
Steve Klabnik [Thu, 7 May 2015 10:21:01 +0000 (12:21 +0200)]
Rollup merge of #24966 - ruud-v-a:explain, r=pnkfelix

The error message was misleading, so I adjusted it, and I also added the long diagnostics for this error (resolves one point in #24407).

I was unsure about how to phrase the error message. Is “generic parameter binding” the correct term for this?

9 years agoRollup merge of #24576 - cactorium:errorcodes, r=pnkfelix
Steve Klabnik [Thu, 7 May 2015 10:21:01 +0000 (12:21 +0200)]
Rollup merge of #24576 - cactorium:errorcodes, r=pnkfelix

For https://github.com/rust-lang/rust/issues/24407

9 years agodoc: fix syntax error in Guessing Game
Andreas Tolfsen [Thu, 7 May 2015 09:59:33 +0000 (11:59 +0200)]
doc: fix syntax error in Guessing Game

9 years agoRemove trailing whitespace on blank line
Rory O’Kane [Thu, 7 May 2015 08:17:10 +0000 (04:17 -0400)]
Remove trailing whitespace on blank line

This style inconsistency was noted at https://travis-ci.org/rust-lang/rust/builds/61583070#L371

9 years agoRefactor doc toggle button label changing
Rory O’Kane [Thu, 7 May 2015 07:53:21 +0000 (03:53 -0400)]
Refactor doc toggle button label changing

To separate concerns, instead of checking the state of `#toggle-all-docs` by looking at its label text, I add or remove a class `will-expand` depending on whether the button’s next click will expand everything. (The `if` statement’s two branches were swapped as part of this change.)

I moved the desired text values to a function `labelForToggleButton`, so changing the values will be easier. I also note in a comment the other file where the text is duplicated.

To allow the labels of both types of toggle buttons to be uniformly set, I added a `span.inner` to the global button too.

I split the template in `render.rs` into multiple lines to make room for the `span`, and that adds whitespace around the `[` and `]` text elements. That seems to be okay, though – the page still looks the same.

I updated the CSS styling for `.collapse-toggle > .inner` to add a little extra space around the symbol, to make minus signs easier to identify. (`#toggle-all-docs > .inner` does not need the same style, since its text size is bigger, so it naturally puts more space around the symbol.)

9 years agoAuto merge of #25125 - Stebalien:from_raw_os, r=alexcrichton
bors [Thu, 7 May 2015 06:51:05 +0000 (06:51 +0000)]
Auto merge of #25125 - Stebalien:from_raw_os, r=alexcrichton

So, I realize this is really late in the game so it's unlikely to be accepted but `FromRawFd`/`FromRawHandle` are necessary for fine grain control over file creation. For example, the current `OpenOptions` does not provide a way to avoid file creation races (there's no way to specify `O_EXCL` or the windows equivalent). Stabilizing these traits and their implementations will give 1.0 users fine-grain control over file creation without committing to any new complex APIs.  Additionally, `AsRawFd`/`AsRawHandle` are already stable so I feel that that stabilizing their inverses is a reasonably small change.

Disclaimer: I'm asking because my crate, tempfile, depends on this feature.

9 years agoAuto merge of #25093 - Ms2ger:mac-consts, r=alexcrichton
bors [Thu, 7 May 2015 04:07:23 +0000 (04:07 +0000)]
Auto merge of #25093 - Ms2ger:mac-consts, r=alexcrichton

These constants were added in 6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7 and
e8fbd1ce048fdfc2db1d446fedfe8775ce446046 to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.

9 years agoAuto merge of #24964 - tamird:cleanup-bitflags, r=alexcrichton
bors [Thu, 7 May 2015 02:14:30 +0000 (02:14 +0000)]
Auto merge of #24964 - tamird:cleanup-bitflags, r=alexcrichton

Depends on #24921. r? @alexcrichton

9 years agoAuto merge of #24890 - jooert:bitvec-append-split_off, r=alexcrichton
bors [Thu, 7 May 2015 00:20:25 +0000 (00:20 +0000)]
Auto merge of #24890 - jooert:bitvec-append-split_off, r=alexcrichton

cc #19986

r? @Gankro

9 years agoAuto merge of #24392 - seanmonstar:lint-transmute-mut, r=alexcrichton
bors [Wed, 6 May 2015 22:27:58 +0000 (22:27 +0000)]
Auto merge of #24392 - seanmonstar:lint-transmute-mut, r=alexcrichton

The [UnsafeCell documentation says it is undefined behavior](http://doc.rust-lang.org/nightly/std/cell/struct.UnsafeCell.html), so people shouldn't do it.

This happened to catch one case in libstd that was doing this, and I switched that to use an UnsafeCell internally.

Closes #13146

9 years agoAdd regression test for #20626
Johannes Oertel [Wed, 6 May 2015 21:29:46 +0000 (23:29 +0200)]
Add regression test for #20626

Closes #20626.

9 years agoAdd regression test for #22463
Johannes Oertel [Tue, 5 May 2015 22:50:05 +0000 (00:50 +0200)]
Add regression test for #22463

Closes #22463.

9 years agoAdd regression test for #22258
Johannes Oertel [Tue, 5 May 2015 22:46:57 +0000 (00:46 +0200)]
Add regression test for #22258

Closes #22258.

9 years agoAdd regression test for #22037
Johannes Oertel [Tue, 5 May 2015 22:43:45 +0000 (00:43 +0200)]
Add regression test for #22037

Closes #22037.

9 years agoAdd regression test for #21701
Johannes Oertel [Tue, 5 May 2015 22:01:11 +0000 (00:01 +0200)]
Add regression test for #21701

Closes #21701.

9 years agoAdd regression test for #21562
Johannes Oertel [Tue, 5 May 2015 21:56:30 +0000 (23:56 +0200)]
Add regression test for #21562

Closes #21562.

9 years agoAdd regression test for #21177
Johannes Oertel [Tue, 5 May 2015 21:52:50 +0000 (23:52 +0200)]
Add regression test for #21177

Closes #21177.

9 years agoRemove schedule_free_slice
Michael Wu [Wed, 6 May 2015 21:09:55 +0000 (17:09 -0400)]
Remove schedule_free_slice

Nothing uses it anymore.

9 years agoAuto merge of #23894 - tbu-:pr_iter_length_position, r=pnkfelix
bors [Wed, 6 May 2015 20:33:10 +0000 (20:33 +0000)]
Auto merge of #23894 - tbu-:pr_iter_length_position, r=pnkfelix

Added documentation of the panicking overflow to the `count` and `position`
methods of `IteratorExt`, also make them more obvious in the code.

Also mention that the `Iterator::next` method of the struct returned by
`IteratorExt::enumerate` can panic due to overflow.

9 years agoimprove comment
Ariel Ben-Yehuda [Wed, 6 May 2015 19:24:13 +0000 (22:24 +0300)]
improve comment

9 years agoAdd missing inline attribute to Not impl for Wrapping<T>
inrustwetrust [Wed, 6 May 2015 19:21:23 +0000 (21:21 +0200)]
Add missing inline attribute to Not impl for Wrapping<T>

9 years agoFix #25076
Ariel Ben-Yehuda [Tue, 5 May 2015 19:09:17 +0000 (22:09 +0300)]
Fix #25076

9 years agoAuto merge of #25153 - jgallagher:rwlock-try-write, r=alexcrichton
bors [Wed, 6 May 2015 18:07:41 +0000 (18:07 +0000)]
Auto merge of #25153 - jgallagher:rwlock-try-write, r=alexcrichton

Previously, `try_write` actually only obtained shared read access (but would return a `RwLockWriteGuard` if that access was successful).

Also updates the docs for `try_read` and `try_write`, which were leftover from when those methods returned `Option` instead of `Result`.

9 years agostd: Remove addition on vectors for now
Alex Crichton [Wed, 6 May 2015 17:51:10 +0000 (10:51 -0700)]
std: Remove addition on vectors for now

Ideally this trait implementation would be unstable, requiring crates to opt-in
if they would like the functionality, but that's not currently how stability
works so the implementation needs to be removed entirely.

This may come back at a future date, but for now the conservative option is to
remove it.

[breaking-change]

9 years agodoc: Fix remove secret number at final source
らいどっと [Wed, 6 May 2015 17:20:31 +0000 (02:20 +0900)]
doc: Fix remove secret number at final source

Remove printing of secret number at final source.

9 years agodoc: Fix remove unused variable
らいどっと [Wed, 6 May 2015 16:58:55 +0000 (01:58 +0900)]
doc: Fix remove unused variable

This commit depends on #25148.

9 years agoMove the SC constants for macos to an accessible module (fixes #24374 for mac).
Ms2ger [Mon, 4 May 2015 08:26:24 +0000 (10:26 +0200)]
Move the SC constants for macos to an accessible module (fixes #24374 for mac).

These constants were added in 6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7 and
e8fbd1ce048fdfc2db1d446fedfe8775ce446046 to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.

It appears that some of the constants may actually belong in a POSIX module,
but I didn't make these changes here because I don't have access to the POSIX
standard.

9 years agoStabilize from_raw_os
Steven Allen [Wed, 6 May 2015 00:25:14 +0000 (20:25 -0400)]
Stabilize from_raw_os

9 years agoAuto merge of #25135 - alexcrichton:generalize-env-set-var, r=aturon
bors [Wed, 6 May 2015 15:50:13 +0000 (15:50 +0000)]
Auto merge of #25135 - alexcrichton:generalize-env-set-var, r=aturon

Many bounds are currently of the form `T: ?Sized + AsRef<OsStr>` where the
argument is `&T`, but the pattern elsewhere (primarily `std::fs`) has been to
remove the `?Sized` bound and take `T` instead (allowing usage with both
references and owned values). This commit generalizes the possible apis in
`std::env` from `&T` to `T` in this fashion.

The `split_paths` function remains the same as the return value borrows the
input value, so ta borrowed reference is required.

9 years agoUpdate documentation for RwLock::try_{read,write}.
John Gallagher [Wed, 6 May 2015 15:47:30 +0000 (11:47 -0400)]
Update documentation for RwLock::try_{read,write}.

9 years agoMake RwLock::try_write try to obtain a write lock
John Gallagher [Wed, 6 May 2015 15:47:11 +0000 (11:47 -0400)]
Make RwLock::try_write try to obtain a write lock

9 years agoMake overflow behaviour more obvious in the iterator module of `libcore`
Tobias Bucher [Tue, 31 Mar 2015 10:21:12 +0000 (12:21 +0200)]
Make overflow behaviour more obvious in the iterator module of `libcore`

Explicitely spell out behaviour on overflow for `usize`-returning iterator
functions.

Mention that panics are guaranteed if debug assertions are active, otherwise a
wrong result might be returned.

9 years agoIter Docs: Mention 'reduce' and 'inject'
Pascal Hertleif [Wed, 6 May 2015 11:34:34 +0000 (13:34 +0200)]
Iter Docs: Mention 'reduce' and 'inject'

9 years agoCorrect initial guessing game example. Fixes #25147. r? @steveklabnik
Paul Banks [Wed, 6 May 2015 13:00:35 +0000 (14:00 +0100)]
Correct initial guessing game example. Fixes #25147. r? @steveklabnik