Commit Graph

43107 Commits

Author SHA1 Message Date
bors 78c4d53871 Auto merge of #25882 - steveklabnik:gh25554, r=alexcrichton
Fixes #25554
2015-05-30 21:10:07 +00:00
bors ee1ba33c4c Auto merge of #25904 - benaryorg:master, r=steveklabnik
perhaps the smallest and least useful fix in the whole history of rust

I will not blame you if you do not want to merge it
2015-05-30 17:09:53 +00:00
benaryorg 2029799d17
fix documentation in libserialize
the object was serialized with an 'i' but the comment stated the print command
would output 'j'
2015-05-30 17:41:09 +02:00
bors 474c6e0ae4 Auto merge of #25818 - sfackler:socket-timeouts, r=alexcrichton
Closes #25619 

r? @alexcrichton
2015-05-30 04:20:20 +00:00
Steven Fackler b5c6c7ed40 Loosen timeout restrictions 2015-05-29 19:09:29 -07:00
bors a0f028da07 Auto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton
Closes #24443.
2015-05-30 01:12:35 +00:00
bors b77d60adb0 Auto merge of #25888 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25788, #25861, #25864, #25865, #25866, #25873, #25876, #25883, #25886
- Failed merges:
2015-05-29 21:00:26 +00:00
Steve Klabnik ed19a6e034 Rollup merge of #25886 - nhowell:patch-1, r=steveklabnik
r? @steveklabnik
2015-05-29 15:24:47 -04:00
Steve Klabnik 253fb5bd8b Rollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton
Fixes #25417
2015-05-29 15:24:47 -04:00
Steve Klabnik 697834f485 Rollup merge of #25876 - tshepang:patch-3, r=steveklabnik 2015-05-29 15:24:47 -04:00
Steve Klabnik c0a41b9999 Rollup merge of #25873 - nham:update_E0015, r=Aatch
The E0397 explanation, as I've written it, isn't really an explanation, but I'm not sure what to put here. I will happily take suggestions.

Partially addresses https://github.com/rust-lang/rust/issues/25851
2015-05-29 15:24:47 -04:00
Steve Klabnik c2a5d31f30 Rollup merge of #25866 - jooert:update_guidelines, r=steveklabnik
So that rust-guidelines can be deleted and src/doc/style can prosper as the official home of the rust guidelines. 😃
2015-05-29 15:24:47 -04:00
Steve Klabnik c7b1f37c59 Rollup merge of #25865 - azerupi:patch-2, r=alexcrichton
"workd" corrected to "world"
2015-05-29 15:24:46 -04:00
Steve Klabnik 5d2af1c724 Rollup merge of #25864 - azerupi:patch-1, r=alexcrichton
There was no opening parenthesis for this closing parenthesis...
2015-05-29 15:24:46 -04:00
Steve Klabnik 1999d759f7 Rollup merge of #25861 - tringenbach:master, r=steveklabnik
This adds an example from mem::swap, and provides some suggested uses of this
function.

This is my attempt to summarize the answers to a question I asked on reddit http://www.reddit.com/r/rust/comments/37jcul/what_is_forget_for/ and add the answers to the documentation so that no one else has to google or ask the question again.
2015-05-29 15:24:46 -04:00
Steve Klabnik e9e2a11a6a Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik
r? @steveklabnik
2015-05-29 15:24:46 -04:00
bors 996fb8d001 Auto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon
This commit implements a number of standard traits for the standard library's
process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the
`Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the
`Child{Stdout,Stdin,Stderr}` types.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.
2015-05-29 19:24:40 +00:00
Nathaniel Theis 103e79d26a Implement RFC 771: std::iter::once 2015-05-29 12:02:13 -07:00
Tim Ringenbach 8746b1ac6f Improve mem::forget documentation
This adds an example from mem::swap, and provides some suggested uses of this
function.

Change wording on comment on forget line to be more specific as to why we
need to call forget.

This breaks the examples up into three pieces. The last piece isn't
compiling for some reason.
2015-05-29 13:29:42 -05:00
Nick Howell 81a413bb01 trpl: eight sections, not seven 2015-05-29 14:29:35 -04:00
bors 84254948c2 Auto merge of #25880 - nikomatsakis:const-fn-feature-gate-calls, r=alexcrichton
The previous feature gate assumed we would not define any (stable) const fns. But then @eddyb went and cleaned up the code. So this now extends the feature-gate to prohibit calls; but calls inside of macros are considered ok.

r? @alexcrichton
2015-05-29 17:38:40 +00:00
Steve Klabnik 5e941877fe Add syntax for multiple lifetimes
Fixes #25417
2015-05-29 12:52:02 -04:00
Steve Klabnik b218470b4d Make note about $ more prominent.
Fixes #25554
2015-05-29 12:20:32 -04:00
Niko Matsakis 808b411244 New tests for cross-crate usages of const fn and so forth 2015-05-29 11:52:59 -04:00
Steven Fackler 494901a8b4 Fix windows recvfrom definition 2015-05-29 08:32:22 -07:00
Steven Fackler 39abcef0a7 Skip timeout upper bound check on windows 2015-05-29 08:32:22 -07:00
bors 2d447e40e2 Auto merge of #25857 - killercup:patch-14, r=steveklabnik
Thanks to @cers who reported this in killercup/trpl-ebook#14!

r? @steveklabnik
2015-05-29 14:53:59 +00:00
Niko Matsakis 2c5e784d6f add const_fn features 2015-05-29 09:42:54 -04:00
Niko Matsakis 1f29fd4eb0 add a test for const fn methods, as suggested by @pnkfelix 2015-05-29 09:42:54 -04:00
Niko Matsakis 57c75b6b10 permit const-fn in macro expansions 2015-05-29 09:42:54 -04:00
Niko Matsakis 710270d9c0 Add feature-gate to calling const fn 2015-05-29 09:42:53 -04:00
bors 2de64ef305 Auto merge of #25760 - Ms2ger:tagged_docs, r=Manishearth 2015-05-29 13:19:46 +00:00
bors 3a433b968b Auto merge of #25854 - liigo:patch-1, r=alexcrichton 2015-05-29 11:46:08 +00:00
bors db1c761b7e Auto merge of #25838 - mbrubeck:doc-edit, r=steveklabnik
Fixes #25622. r? @steveklabnik
2015-05-29 10:13:05 +00:00
Tshepang Lekhonkhobe deb4948395 remove the last mention of IoResult 2015-05-29 10:58:39 +02:00
bors b9eb606801 Auto merge of #25830 - steveklabnik:debug_docs, r=alexcrichton 2015-05-29 08:40:20 +00:00
bors 25fc917c65 Auto merge of #25747 - SimonSapin:map_ref, r=alexcrichton
For slightly complex data structures like `rustc_serialize::json::Json`, it is often convenient to have helper methods like `Json::as_string(&self) -> Option<&str>`  that return a borrow of some component of `&self`.

However, when `RefCell`s are involved, keeping a `Ref` around is required to hold a borrow to the insides of a `RefCell`. But `Ref` so far only references the entirety of the contents of a `RefCell`, not a component. But there is no reason it couldn’t: `Ref` internally contains just a data reference and a borrow count reference. The two can be dissociated.

This adds a `map_ref` function that creates a new `Ref` for some other data, but borrowing the same `RefCell` as an existing `Ref`.

Example:

```rust
struct RefCellJson(RefCell<Json>);

impl RefCellJson {
    fn as_string(&self) -> Option<Ref<str>> {
        map_ref(self.borrow(), |j| j.as_string())
    }
}
```

r? @alexcrichton
2015-05-29 07:07:07 +00:00
Simon Sapin d0afa6ede3 Add map and filter_map associated functions to std::cell::Ref and RefMut
See design discussion in https://github.com/rust-lang/rust/pull/25747
2015-05-29 08:39:07 +02:00
bors 42a59aef71 Auto merge of #25832 - edunham:document-gh-issue-tags, r=alexcrichton
I took a guess at what they mean, but could be totally wrong. Please comment, and I'll update the PR with corrections!
2015-05-29 05:34:28 +00:00
Steven Fackler 69a0e1af95 Implement RFC 1047 - socket timeouts
Closes #25619
2015-05-28 20:03:20 -07:00
Nick Hamann fdf3ce76cf Change E0015 and E0378 explanations to link to text of RFC 911, not rfc PR. 2015-05-28 21:12:46 -05:00
Nick Hamann 364035497c Revise E0015 according to feedback. 2015-05-28 21:02:13 -05:00
bors 99c2f779d2 Auto merge of #25816 - sfackler:io-error-delegation, r=alexcrichton
The first commit simply forwards `io::Error`'s `cause` implementation to the inner error.

The second commit adds accessor methods for the inner error. Method names mirror those used elsewhere like `BufReader`.

r? @alexcrichton
2015-05-29 01:09:48 +00:00
Nick Hamann 7e78e708fb Convert mutable statics error to have error code and add explanation.
Also changes 'owned pointers' => 'boxes' in the error message.
2015-05-28 19:28:07 -05:00
Nils Liberg adac861db2 Fix link to newtypes page 2015-05-29 01:02:24 +02:00
Nils Liberg d0744ba3e7 Fix mistake: "to to" -> "to" 2015-05-29 01:02:24 +02:00
David Campbell 31a007af19 remove extra space from "over" code as well 2015-05-29 01:02:24 +02:00
David Campbell 4d90b4d9b8 Update let.md -- follow whitespace style guideline
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."
2015-05-29 01:02:24 +02:00
Corey Farwell 06706510cb Make adjancent code examples more similar 2015-05-29 01:02:24 +02:00
David Campbell 19cb2a7707 add newline before list in functions-and-methods
The current version of hoedown treats lists interrupting paragraphs in the Markdown.pl style rather than CommonMark, so a newline is needed for the list to be rendered properly.
2015-05-29 01:02:24 +02:00