-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup 2014 12 03 #19508
Merged
Merged
Rollup 2014 12 03 #19508
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We don't need this &mut, and vec could use []s
deriving encodable + using json::PrettyEncoder removes the only ToJson trait implementation in the rust repository outside of libserialize
This replaces the previous "Lifetimes guide," since we are discussing things from an owernship perspective now.
- String == &str == CowString - Vec == &[T] == &mut [T] == [T, ..N] == CowVec - InternedString == &str
In particular, ItemType variants are no longer reexported. Since we already do namespace them via `item_type` mod, it's fine.
They are just (unsafe) functions and static items to most users and even compilers! The metadata doesn't distinguish them, so Rustdoc ended up producing broken links (generated `ffi.*.html`, links to `fn.*.html`). It would be best to avoid this pitfall at all.
these are missing standard #![doc(...)]. add them
Fixes the JS error in #18354 at least. I don't know if there's a more underlying issue that needs addressing.
After the library successfully called `fork(2)`, the child does several setup works such as setting UID, GID and current directory before it calls `exec(2)`. When those setup works failed, the child exits but the parent didn't call `waitpid(2)` and left it as a zombie. This patch also add several sanity checks. They shouldn't make any noticeable impact to runtime performance. The new test case in `libstd/io/process.rs` calls the ps command to check if the new code can really reap a zombie. The output of `ps -A -o pid,sid,command` should look like this: ``` PID SID COMMAND 1 1 /sbin/init 2 0 [kthreadd] 3 0 [ksoftirqd/0] ... 12562 9237 ./spawn-failure 12563 9237 [spawn-failure] <defunct> 12564 9237 [spawn-failure] <defunct> ... 12592 9237 [spawn-failure] <defunct> 12593 9237 ps -A -o pid,sid,command 12884 12884 /bin/zsh 12922 12922 /bin/zsh ... ``` where `./spawn-failure` is my test program which intentionally leaves many zombies. Filtering the output with the "SID" (session ID) column is a quick way to tell if a process (zombie) was spawned by my own test program. Then the number of "defunct" lines is the number of zombie children.
I think that this wording makes it more clear as to what we're doing here. Opinions @steveklabnik ?
Using `and` here instead of `but` sounds better to me, as but makes it sound like an item which is still under active development shouldn't normally require more testing, but this one does - or something like that :-) @steveklabnik?
1. Made small improvements to the docs for checked_sub, checked_mul and checked_div. 2. Updated a confusingly outdated comment for intrinsics, noticed before at <https://stackoverflow.com/questions/23582931/>.
Closes #19469 r?
First half of bootstrapping rust-lang/rfcs#446
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?
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.)
This series of commits deals with broken links to the source code. It also refactors some repetitive codes from Rustdoc. The most important commit, 1cb1f00, 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 bda97e8 (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
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
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.)
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).
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.
Fixes #19335. (or at least, the actionable parts)
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.
…4_12_03 Conflicts: src/libcollections/trie/set.rs
bors
added a commit
that referenced
this pull request
Dec 5, 2014
I have pushed this to master as the buildbot run failed because android timed out, but I believe it to be a flaky test and we want to get the queue moving. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.