Commit Graph

42337 Commits

Author SHA1 Message Date
Steve Klabnik
414e37f3d4 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.
2015-05-07 12:21:04 +02:00
Steve Klabnik
48b67f04bf 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
2015-05-07 12:21:04 +02:00
Steve Klabnik
0d347e1620 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)
2015-05-07 12:21:03 +02:00
Steve Klabnik
1d3183929a Rollup merge of #25142 - rydotyosh:patch-1, r=alexcrichton 2015-05-07 12:21:03 +02:00
Steve Klabnik
0ad94ae126 Rollup merge of #25141 - steveklabnik:fix_guessing_game, r=huonw
https://github.com/rust-lang/rust/pull/25080/files#r29634986

r? @huonw
2015-05-07 12:21:03 +02:00
Steve Klabnik
888c12ccbb Rollup merge of #25139 - hibariya:fix-indentation, r=alexcrichton 2015-05-07 12:21:03 +02:00
Steve Klabnik
b7ce230329 Rollup merge of #25138 - tshepang:typos, r=sanxiyn 2015-05-07 12:21:02 +02:00
Steve Klabnik
42212bb44a 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!!!!!!
2015-05-07 12:21:02 +02:00
Steve Klabnik
6b56f790db Rollup merge of #25131 - janne:patch-1, r=alexcrichton 2015-05-07 12:21:02 +02:00
Steve Klabnik
76bbb3237c Rollup merge of #25052 - jooert:misc_attr_reference, r=steveklabnik
Unsafe destructors were removed, added remarks about needed feature gates.

cc #16676 
r? @steveklabnik
2015-05-07 12:21:02 +02:00
Steve Klabnik
74d24ad6af 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?
2015-05-07 12:21:01 +02:00
Steve Klabnik
52174305a0 Rollup merge of #24576 - cactorium:errorcodes, r=pnkfelix
For https://github.com/rust-lang/rust/issues/24407
2015-05-07 12:21:01 +02:00
Andreas Tolfsen
9f84260138 doc: fix syntax error in Guessing Game 2015-05-07 11:59:33 +02:00
Rory O’Kane
61bb091f06 Remove trailing whitespace on blank line
This style inconsistency was noted at https://travis-ci.org/rust-lang/rust/builds/61583070#L371
2015-05-07 04:17:10 -04:00
Rory O’Kane
92565b3dfb 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.)
2015-05-07 04:11:14 -04:00
bors
95607544b6 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.
2015-05-07 06:51:05 +00:00
bors
055d926693 Auto merge of #25093 - Ms2ger:mac-consts, r=alexcrichton
These constants were added in 6f54ce9aa5 and
e8fbd1ce04 to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.
2015-05-07 04:07:23 +00:00
bors
347ee73ef7 Auto merge of #24964 - tamird:cleanup-bitflags, r=alexcrichton
Depends on #24921. r? @alexcrichton
2015-05-07 02:14:30 +00:00
bors
e8b4c84e39 Auto merge of #24890 - jooert:bitvec-append-split_off, r=alexcrichton
cc #19986 

r? @Gankro
2015-05-07 00:20:25 +00:00
bors
8767e97d7e 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
2015-05-06 22:27:58 +00:00
Johannes Oertel
1a8ccd72d6 Add regression test for #20626
Closes #20626.
2015-05-07 00:25:54 +02:00
Johannes Oertel
6de3cdc0e0 Add regression test for #22463
Closes #22463.
2015-05-07 00:25:53 +02:00
Johannes Oertel
106461b6e5 Add regression test for #22258
Closes #22258.
2015-05-07 00:25:53 +02:00
Johannes Oertel
642db4b8b5 Add regression test for #22037
Closes #22037.
2015-05-07 00:25:53 +02:00
Johannes Oertel
57a53f0dfb Add regression test for #21701
Closes #21701.
2015-05-07 00:25:53 +02:00
Johannes Oertel
208452cdaf Add regression test for #21562
Closes #21562.
2015-05-07 00:25:48 +02:00
Johannes Oertel
5b8a486b9e Add regression test for #21177
Closes #21177.
2015-05-06 23:30:51 +02:00
Michael Wu
bfdbda24d9 Remove schedule_free_slice
Nothing uses it anymore.
2015-05-06 17:09:55 -04:00
bors
6c9f8408d5 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.
2015-05-06 20:33:10 +00:00
Ariel Ben-Yehuda
df42976e4d improve comment 2015-05-06 22:24:13 +03:00
inrustwetrust
48636f3179 Add missing inline attribute to Not impl for Wrapping<T> 2015-05-06 21:21:23 +02:00
Ariel Ben-Yehuda
4d8d68f80d Fix #25076 2015-05-06 22:12:10 +03:00
bors
e6378cbda3 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`.
2015-05-06 18:07:41 +00:00
Alex Crichton
8d3f84e235 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]
2015-05-06 10:52:34 -07:00
らいどっと
1884c87207 doc: Fix remove secret number at final source
Remove printing of secret number at final source.
2015-05-07 02:20:31 +09:00
らいどっと
08923fbff2 doc: Fix remove unused variable
This commit depends on #25148.
2015-05-07 01:58:55 +09:00
Ms2ger
ff89600813 Move the SC constants for macos to an accessible module (fixes #24374 for mac).
These constants were added in 6f54ce9aa5 and
e8fbd1ce04 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.
2015-05-06 18:50:48 +02:00
Steven Allen
f9f01efad2 Stabilize from_raw_os 2015-05-06 12:29:08 -04:00
bors
0848d1c6a5 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.
2015-05-06 15:50:13 +00:00
John Gallagher
833fc273a7 Update documentation for RwLock::try_{read,write}. 2015-05-06 11:47:30 -04:00
John Gallagher
30b883b93f Make RwLock::try_write try to obtain a write lock 2015-05-06 11:47:11 -04:00
Tobias Bucher
29d7fed994 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.
2015-05-06 17:17:48 +02:00
Pascal Hertleif
1d6285ebba Iter Docs: Mention 'reduce' and 'inject' 2015-05-06 15:51:06 +02:00
Paul Banks
81b90bd56f Correct initial guessing game example. Fixes #25147. r? @steveklabnik 2015-05-06 14:00:35 +01:00
Andrei Oprea
45c461c429 Add note about type signature searching to docs 2015-05-06 15:22:35 +03:00
Kang Seonghoon
3d34e177dd core: use banker's rounding for the exact mode in flt2dec.
For the shortest mode the IEEE 754 decoder already provides
an exact rounding range accounting for banker's rounding,
but it was not the case for the exact mode. This commit alters
the exact mode algorithm for Dragon so that any number ending at
`...x5000...` with even `x` and infinite zeroes will round to
`...x` instead of `...(x+1)` as it was. Grisu is not affected
by this change because this halfway case always results in
the failure for Grisu.
2015-05-06 21:11:14 +09:00
bors
5a83fa271d Auto merge of #25120 - bluss:sliceconcatext, r=alexcrichton
collections: Convert SliceConcatExt to use associated types

Coherence now allows this, we have `SliceConcatExt<T> for [V] where T: Sized + Clone` and` SliceConcatExt<str> for [S]`, these don't conflict because
str is never Sized.
2015-05-06 11:56:15 +00:00
bors
fc45fd99f5 Auto merge of #25117 - jooert:tests, r=alexcrichton 2015-05-06 09:48:58 +00:00
Kelvin Ly
4174aa40f4 Reword with pnkfelix's suggestion 2015-05-06 05:43:05 -04:00
らいどっと
085e1f489b doc: Fix link of repr attribute 2015-05-06 18:11:54 +09:00