Commit Graph

34819 Commits

Author SHA1 Message Date
Jorge Aparicio
71d8d578c6 librustc_back: remove unnecessary to_string() calls 2014-12-06 23:53:02 -05:00
Jorge Aparicio
8379d72293 libgetopts: remove unnecessary to_string() calls 2014-12-06 23:53:02 -05:00
Jorge Aparicio
98ae63753b libcollections: remove unnecessary to_string() calls 2014-12-06 23:53:02 -05:00
Jorge Aparicio
976660f3f7 libtest: remove unnecessary as_mut_slice() calls 2014-12-06 23:53:02 -05:00
Jorge Aparicio
6132a90788 libstd: remove unnecessary as_mut_slice calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
5172981207 librustdoc: remove unnecessary as_mut_slice calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
a0a354ff22 librustc_trans: remove unnecessary as_mut_slice calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
d64fd22c71 librustc: remove unnecessary as_mut_slice calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
5a24058889 libcollections: remove unnecessary as_mut_slice() calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
a0621f8eba libtest: remove unnecessary as_slice() calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
53b479c195 libterm: remove unnecessary as_slice() calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
39f44c0c20 libsyntax: remove unnecessary as_slice() calls 2014-12-06 23:53:01 -05:00
Jorge Aparicio
60338d91c4 libstd: remove unnecessary as_slice() calls 2014-12-06 23:53:00 -05:00
Jorge Aparicio
09f7713dd4 libserialize: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
e6bd217ce8 librustdoc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
8bb5ef9df5 librustc_trans: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
7d8eabb226 librustc_back: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
00f3c3f7a7 librustc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
ae555a99a6 libregex_macros: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
89e6a81ef9 libregex: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0ea31348d9 liblog: remove unnecessary as_slice calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
c0ef959b31 libgraphviz: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
6efc87945b libgetops: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
a7960136ac libfmt_macros: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0f54f32a9c libflate: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
5257a5b284 libcoretest: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
0ac3b166df liballoc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
Jorge Aparicio
f2af07e6d5 libcollections: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
bors
de83d7dd19 auto merge of #19431 : erickt/rust/buf-writer-error, r=alexcrichton
Previously, `BufWriter::write` would just return an `std::io::OtherIoError` if someone attempted to write past the end of the wrapped buffer. This pull request changes the error to support partial writes and return a `std::io::ShortWrite`, or an `io::io::EndOfFile` if it's been fully exhausted.

 I've also optimized away a bounds check inside `BufWriter::write`, which should help shave off some nanoseconds in an inner loops.
2014-12-06 20:12:13 +00:00
bors
358db12a89 auto merge of #19590 : sfackler/rust/fix-android, r=sfackler
Seems to be blocking forever
2014-12-06 17:42:16 +00:00
Steven Fackler
2e2aca9eb8 Ignore wait-forked-but-failed-child
Test will be fixed in #19588
2014-12-06 08:13:57 -08:00
Steven Fackler
8a288d3aff Ignore issue #16671 test on android
Seems to be blocking forever
2014-12-05 20:22:35 -08:00
bors
6f4c11be3b auto merge of #19508 : cmr/rust/rollup-2014_12_03, r=cmr 2014-12-05 20:23:10 +00:00
Corey Richardson
33f34bdb4e Merge remote-tracking branch 'csouth3/trieset-bitops' into rollup-2014_12_03
Conflicts:
	src/libcollections/trie/set.rs
2014-12-05 11:19:50 -08:00
Chase Southwood
309ab34b7a Implement BitOps for TrieSet 2014-12-05 12:58:45 -06:00
Corey Richardson
090110779f rollup merge of #19553: sfackler/issue-19543
Closes #19543
2014-12-05 10:08:33 -08:00
Corey Richardson
a90e0d70cc rollup merge of #19534: scialex/liballoc-cfg
Adds the ability to use a custom allocator heap by passing either --cfg
external_crate and --extern external=<allocator_crate_name> or --cfg
external_funcs and defining the allocator functions prefixed by 'rust_'
somewhere.

This is useful for many applications including OS/embedded development,
and allocator development and testing.
2014-12-05 10:08:28 -08:00
Corey Richardson
b8eaf7bc8a rollup merge of #19530: aochagavia/remove-test
Fixes https://github.com/rust-lang/rust/issues/19510
2014-12-05 10:08:26 -08:00
Corey Richardson
d602c058ae rollup merge of #19528: aliblong/add_vecmap_capacity
Part of #18424

Adds `capacity()` function to VecMap, as per the collections reform.

(Salvaged from #19516, #19523, while we await an RFC regarding `reserve`/`reserve_index` for `VecMap`)
2014-12-05 10:08:24 -08:00
Corey Richardson
39646d2ff6 rollup merge of #19526: steveklabnik/gh19402
Fixes #19402.
2014-12-05 10:07:49 -08:00
Corey Richardson
0fb040f4bd rollup merge of #19525: steveklabnik/guide_edits
Fixes #19335. (or at least, the actionable parts)
2014-12-05 10:07:48 -08:00
Corey Richardson
c7d545e2f7 rollup merge of #19520: csouth3/derefmut-unsized
Right now, `DerefMut` is not `for Sized?`, so you can't impl `DerefMut<T> for Foo` where `Foo` is unsized.  However, there is no reason that it can't be `for Sized?`, so this pull request fixes the issue.

Closes #19493.
2014-12-05 10:07:47 -08:00
Corey Richardson
d58aecb6b3 rollup merge of #19518: csouth3/trieset-bitops
Implement the `BitOr`, `BitAnd`, `BitXor`, and `Sub` traits from `std::ops` for TrieSet.  The behavior of these operator overloads is consistent with [RFC 235](https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#combinations).
2014-12-05 10:07:45 -08:00
Corey Richardson
4e492cbaf8 rollup merge of #19515: lifthrasiir/rustdoc-wrong-dedup
Fixes #17332.
2014-12-05 10:07:44 -08:00
Corey Richardson
f3a85cf822 rollup merge of #19513: lifthrasiir/rustdoc-fat-redirect
We heavily rely on queries and fragments in the URL structure, so it is desired to preserve them even in the redirects. The generated redirect pages try to preserve them with scripts, which take precedence over the original `Refresh` metadata. Non-scripting browsers would continue to work (with no queries and fragments).

(This in turn solves a number of semi-broken links to the source code, which are actually linked to redirect pages.)
2014-12-05 10:07:42 -08:00
Corey Richardson
33e96be299 rollup merge of #19512: cybergeek94/master
Added the example from [this Reddit thread][1], reworked to be more robust with correct logic (first link skipped the 0th and 1st Fibonacci numbers, second forgot about the last two valid values before overflow). Will yield all Fibonacci numbers sequentially in the range `[0, <u32 as Int>::max_value())`.

If the example is too complicated I can change it to a more naive version, perhaps using signed integers to check for overflow instead of `Option` and `.checked_add()`.

Also reworded the doc comments to clarify the usage and behavior of `Unfold`, as the thread suggested that it wasn't really clear how `Unfold` worked and when one should use it.

This change is in the `core` crate but I based the example on `std` since that's where most readers will find the example. I included a note about `core` for clarity. Edit: removed.

Tested with `rustdoc src/libcore/lib.rs`. Rebased against latest master as of the creation of this PR.

[1]: http://www.reddit.com/r/rust/comments/2ny8r1/a_question_about_loops/cmighu4?context=10000
2014-12-05 10:07:41 -08:00
Corey Richardson
a8c1812f36 rollup merge of #19503: lifthrasiir/xenophobic-rustdoc
This series of commits deals with broken links to the source code. It also refactors some repetitive codes from Rustdoc. The most important commit, 1cb1f00d40, describes the rationale; this will fix a half of #16289. Other commits are reasonably independent to each other and can be made into indiviudal PRs at the request.

### Notes on the broken source links

As of bda97e8557 (I've used this to check the PR works as intended), there are 281 (!) such broken links. They can be further classified as follows:

* 178 links to incorrect item types. This is the first half of #16289, and this PR fixes all of them.
* 89 links to redirect pages. They are not technically "broken" but still doesn't give a source code. I have a fix for this in mind, which would make a redirect page slightly *fat*.
* 14 links to incorrect `DefId` in the `gotosrc` parameter. This is #15309, and affects many `liballoc` reexports in `libstd` but *nothing else* (curiously). I'm yet to track this down; might be a metadata bug (not sure).
* 0 links to the crate reexported as a different name. This is the second half of #16289, and seems not hard to fix but I'm running out of time.

Prevalence of this kind of bugs calls for a full link verifier integrated into the testing process. :S
2014-12-05 10:07:38 -08:00
Corey Richardson
fdb395626b rollup merge of #19494: P1start/better-expected
As an example of what this changes, the following code:

```rust
let x: [int ..4];
```

Currently spits out ‘expected `]`, found `..`’. However, a comma would also be valid there, as would a number of other tokens. This change adjusts the parser to produce more accurate errors, so that that example now produces ‘expected one of `(`, `+`, `,`, `::`, or `]`, found `..`’.

(Thanks to cramer on IRC for pointing out this problem with diagnostics.)
2014-12-05 10:07:36 -08:00
Corey Richardson
13befdff91 rollup merge of #19492: steveklabnik/remove_outdated_comment
https://github.com/rust-lang/rust/pull/19472#issuecomment-65370278

/cc @alexcrichton
2014-12-05 10:07:34 -08:00
Corey Richardson
3489fc4134 rollup merge of #19491: oli-obk/libtest_tojson_dependency
deriving encodable + using json::PrettyEncoder removes the only ToJson trait implementation in the rust repository outside of libserialize

@pcwalton does this agree with your FIXME comment?
2014-12-05 10:07:31 -08:00