Skip to content

Commit

Permalink
Auto merge of #34464 - Manishearth:rollup, r=Manishearth
Browse files Browse the repository at this point in the history
Rollup of 8 pull requests

- Successful merges: #34379, #34406, #34411, #34414, #34435, #34438, #34445, #34449
- Failed merges:
  • Loading branch information
bors committed Jun 25, 2016
2 parents 35004b4 + 77b6a64 commit b8214dc
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ compiler. What actually happens when you invoke rustbuild is:
1. The entry point script, `src/bootstrap/bootstrap.py` is run. This script is
responsible for downloading the stage0 compiler/Cargo binaries, and it then
compiles the build system itself (this folder). Finally, it then invokes the
actual `boostrap` binary build system.
actual `bootstrap` binary build system.
2. In Rust, `bootstrap` will slurp up all configuration, perform a number of
sanity checks (compilers exist for example), and then start building the
stage0 artifacts.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Here, we bind the first and last element of the tuple to `x` and `z`, but
ignore the middle element.

It’s worth noting that using `_` never binds the value in the first place,
which means a value may not move:
which means that the value does not move:

```rust
let tuple: (u32, String) = (5, String::from("five"));
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use hir;

// The actual lang items defined come at the end of this file in one handy table.
// So you probably just want to nip down to the end.
macro_rules! lets_do_this {
macro_rules! language_item_table {
(
$( $variant:ident, $name:expr, $method:ident; )*
) => {
Expand Down Expand Up @@ -269,7 +269,7 @@ pub fn collect_language_items(session: &Session,
}
}

lets_do_this! {
language_item_table! {
// Variant name, Name, Method name;
CharImplItem, "char", char_impl;
StrImplItem, "str", str_impl;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
},
FutureIncompatibleInfo {
id: LintId::of(INVALID_TYPE_PARAM_DEFAULT),
reference: "PR 30742 <https://github.com/rust-lang/rust/pull/30724>",
reference: "PR 30724 <https://github.com/rust-lang/rust/pull/30724>",
},
FutureIncompatibleInfo {
id: LintId::of(SUPER_OR_SELF_IN_GLOBAL_PATH),
Expand Down
11 changes: 11 additions & 0 deletions src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ Or:
let unknown_variable = 12u32;
let x = unknown_variable; // ok!
```
If the item is not defined in the current module, it must be imported using a
`use` statement, like so:
```ignore
use foo::bar;
bar();
```
If the item you are importing is not defined in some super-module of the
current module, then it must also be declared as public (e.g., `pub fn`).
"##,

E0426: r##"
Expand Down
30 changes: 30 additions & 0 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,36 @@ impl<T> JoinInner<T> {
/// Due to platform restrictions, it is not possible to `Clone` this
/// handle: the ability to join a child thread is a uniquely-owned
/// permission.
///
/// This `struct` is created by the [`thread::spawn`] function and the
/// [`thread::Builder::spawn`] method.
///
/// # Examples
///
/// Creation from [`thread::spawn`]:
///
/// ```rust
/// use std::thread;
///
/// let join_handle: thread::JoinHandle<_> = thread::spawn(|| {
/// // some work here
/// });
/// ```
///
/// Creation from [`thread::Builder::spawn`]:
///
/// ```rust
/// use std::thread;
///
/// let builder = thread::Builder::new();
///
/// let join_handle: thread::JoinHandle<_> = builder.spawn(|| {
/// // some work here
/// }).unwrap();
/// ```
///
/// [`thread::spawn`]: fn.spawn.html
/// [`thread::Builder::spawn`]: struct.Builder.html#method.spawn
#[stable(feature = "rust1", since = "1.0.0")]
pub struct JoinHandle<T>(JoinInner<T>);

Expand Down
Loading

0 comments on commit b8214dc

Please sign in to comment.