bors [Fri, 23 Oct 2015 19:46:57 +0000 (19:46 +0000)]
Auto merge of #29241 - nikomatsakis:issue-28871, r=arielb1
Give preference to projections from where-clauses over those from trait definitions. This makes #28871 work again, though I think there's more to fix in this general area.
bors [Fri, 23 Oct 2015 09:06:24 +0000 (09:06 +0000)]
Auto merge of #29194 - chrisccerami:clarify-headers-in-traits-docs, r=Manishearth
It's possible that there is some meaning I'm not grasping from the headers "Traits bounds for generic functions" and "Traits bounds for generic structs", but they seem to me like they could be clearer and more grammatically correct.
bors [Fri, 23 Oct 2015 05:01:40 +0000 (05:01 +0000)]
Auto merge of #29237 - alexcrichton:packaging, r=brson
It looks like the target libs aren't actually the same across hosts so instead
of always packaging the target libs from CFG_BUILD take the target libs from the
host if we have them and then only failing that do we take them from CFG_BUILD.
Niko Matsakis [Thu, 22 Oct 2015 16:28:47 +0000 (12:28 -0400)]
distinguish projections from the env/obj-types vs those from
trait definitions, and give prefence to the former. This is consistent
with what we do for selection. It also works around a limitation
that was leading to #28871.
Steve Klabnik [Thu, 22 Oct 2015 16:43:49 +0000 (12:43 -0400)]
Rollup merge of #29193 - kini:filename-conventions, r=alexcrichton
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program. We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
r? @steveklabnik
(Let me know if I'm sending too many PRs -- I can batch up TRPL edits, say, per chapter, if that works better. Or I can just refrain from editing TRPL as I read through it, if these are not sufficiently useful.)
Steve Klabnik [Thu, 22 Oct 2015 16:43:48 +0000 (12:43 -0400)]
Rollup merge of #29180 - SingingTree:readme_windows_build, r=steveklabnik
Adds the pacman git command to the high level Windows installation instructions. As the MSYS2 installation may not include Windows git on the path by default (based on the path settings of Windows users), I figured this could be a helpful inclusion.
Alex Crichton [Thu, 22 Oct 2015 16:01:34 +0000 (09:01 -0700)]
mk: Prefer target libs coming from their host
It looks like the target libs aren't actually the same across hosts so instead
of always packaging the target libs from CFG_BUILD take the target libs from the
host if we have them and then only failing that do we take them from CFG_BUILD.
bors [Thu, 22 Oct 2015 00:41:21 +0000 (00:41 +0000)]
Auto merge of #28963 - mdinger:arrow, r=steveklabnik
This is to make the link more prominent so hopefully people will actually see it. The new icon is partially because I wasn't sure how easy it would be to apply the previous transformations only to the last character of the string. As it is, I wasn't sure at first but I think the look is growing on me.
A minor nitpick is that the space after `Runnable` is underlined and I tried to fix that but it wasn't working for me right now. I tried switching a link with subelements to a div with subelements but I missed something because it wasn't working correctly.
bors [Wed, 21 Oct 2015 12:56:24 +0000 (12:56 +0000)]
Auto merge of #29179 - cjdrake:fixup, r=steveklabnik
This is a pretty trivial change. My eye caught some inconsistent whitespace while perusing compiler errors tonight. Specifically, I changed `//correct` to `// correct`, and got rid of some trailing whitespace that isn't seen in other code snippets.
bors [Wed, 21 Oct 2015 07:45:48 +0000 (07:45 +0000)]
Auto merge of #29055 - alexcrichton:tiers, r=steveklabnik
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
Keshav Kini [Tue, 20 Oct 2015 21:07:17 +0000 (16:07 -0500)]
Remove reference to `hello_world.rs` in TRPL §2.2
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program. We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
Alex Crichton [Wed, 14 Oct 2015 21:14:11 +0000 (14:14 -0700)]
doc: Clarify supported platforms and tiers
This commit expands the "supported platforms" section of the book to include
documentation on the tiers that Rust currently has as well as organizing all
supported platforms into these various tiers. Infrastructure improvements over
the next few months are likely to change the location of may of these platforms
over, but for now this should faithfully represent what we've got today!
Steve Klabnik [Tue, 20 Oct 2015 13:43:47 +0000 (09:43 -0400)]
Rollup merge of #29175 - durka:patch-8, r=Gankro
Yay, markdown isn't standardized and rustbook's parser has subtle incompatibilities with Github's! So in the Github preview you don't see that this list fails to separate from the previous paragraph. I think this should fix it, but I didn't check.
bors [Tue, 20 Oct 2015 11:55:17 +0000 (11:55 +0000)]
Auto merge of #27723 - mystor:vecdeque_drain_range, r=bluss
This is a WIP PR for my implementation of drain over the VecDeque data structure supporting ranges. It brings the VecDeque drain implementation in line with Vec's.
Tests haven't been written for the new function yet.
bors [Tue, 20 Oct 2015 08:19:19 +0000 (08:19 +0000)]
Auto merge of #29152 - petrochenkov:derstab, r=alexcrichton
The attributes are copied from the item for which the trait impl is derived
I think now we can close these two issues:
https://github.com/rust-lang/rust/issues/13054 - `allow`, `deny` etc. were already copied, now `stable` and `unstable` are copied as well.
https://github.com/rust-lang/rust/issues/18969 - I'm not sure this is needed, insta-stability were good enough so far, copied stability will be better. Nonetheless, it can be subsumed by some more general mechanism for supplying arbitrary not necessarily stability related attributes (for example `inline`) to derived impls and their methods (I haven't found an open issue for such mechanism).
bors [Tue, 20 Oct 2015 06:36:50 +0000 (06:36 +0000)]
Auto merge of #29140 - sorear:dst-document-on-sized, r=alexcrichton
This is for discoverability. If someone wants to know what `?Sized` means, then
Sized will be the only keyword they can use to search; so even though this is
technically a language matter, it makes sense to document it where it will be
looked for.
bors [Tue, 20 Oct 2015 00:30:23 +0000 (00:30 +0000)]
Auto merge of #29009 - alexcrichton:std-pkgs, r=brson
This commit splits out the standard library from the current 'rustc' package
into a new 'rust-std' package. This is the basis for the work on easily
packaging compilers that can cross-compile to new targets.
Steve Klabnik [Mon, 19 Oct 2015 21:14:08 +0000 (17:14 -0400)]
Rollup merge of #29168 - aarzee:master, r=steveklabnik
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines.
Steve Klabnik [Mon, 19 Oct 2015 21:14:08 +0000 (17:14 -0400)]
Rollup merge of #29165 - iajrz:patch-1, r=steveklabnik
To augment the didactic effect, made placed the thread::sleep_ms call in the last example, so that there will be time for the other locks to happen; without this, I was unable to observe the deadlock in over 1,000 runs when there was no left-handed philosopher.
Steve Klabnik [Mon, 19 Oct 2015 21:14:07 +0000 (17:14 -0400)]
Rollup merge of #29132 - sorear:document-ordering-relaxed, r=alexcrichton
I wasn't sure whether `Ordering::Relaxed` meant `Monotonic` or `Unordered`, so I checked the compiler sources and found https://github.com/rust-lang/rust/blob/206af38e74ce7fa4b0e781ece7f1067c018c580e/src/librustc_trans/trans/intrinsic.rs#L846 which appears conclusive. Adding this answer to the documentation.
Steve Klabnik [Mon, 19 Oct 2015 21:14:07 +0000 (17:14 -0400)]
Rollup merge of #29027 - steveklabnik:iter_docs, r=manishearth
Due to the way iterators work, the std::iter module is chock full of
structs that you, humble Rust programmer, will never actually use.
However, they have URLs, and therefore get linked to, because they are
real structs that do exist.
So, rather than just have a tiny sentence about each one of them,
this patch adds links back to the functions and methods on Iterator
which actually create the structs, where helpful documentation already
exists.
bors [Mon, 19 Oct 2015 17:05:40 +0000 (17:05 +0000)]
Auto merge of #28977 - arcnmx:cstring-into, r=alexcrichton
`OsString` has these sorts of conversions, while `CString` has been missing them. I'm iffy on `into_string` simply because the return type would be better off as `FromUtf8Error<CString>`, which of course isn't generic :cry:
Carlos Liam [Mon, 19 Oct 2015 15:16:31 +0000 (11:16 -0400)]
Clean whitespace
Remove leading newlines; replace lines containing only whitespace with empty lines; replace multiple trailing newlines with a single newline; remove trailing whitespace in lines
Made the example capable of consistent deadlocking
To augment the didactic effect, made placed the thread::sleep_ms call in the last example, so that there will be time for the other locks to happen; without this, I was unable to observe the deadlock in over 1,000 runs when there was no left-handed philosopher.
bors [Mon, 19 Oct 2015 12:45:25 +0000 (12:45 +0000)]
Auto merge of #29153 - arcnmx:thread-spawn, r=alexcrichton
Fixes #29128
Most of the weird lifetime things and `inner` stuff seems like leftover cruft from `thread::scoped`. Should `JoinInner` just be removed/merged with `JoinHandle`?
Also is it okay to remove the `FnBox`? I'm not really sure why there were two allocations there...