Skip to content

Commit b8214dc

Browse files
authored
Auto merge of #34464 - Manishearth:rollup, r=Manishearth
Rollup of 8 pull requests - Successful merges: #34379, #34406, #34411, #34414, #34435, #34438, #34445, #34449 - Failed merges:
2 parents 35004b4 + 77b6a64 commit b8214dc

File tree

7 files changed

+181
-41
lines changed

7 files changed

+181
-41
lines changed

src/bootstrap/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ compiler. What actually happens when you invoke rustbuild is:
5050
1. The entry point script, `src/bootstrap/bootstrap.py` is run. This script is
5151
responsible for downloading the stage0 compiler/Cargo binaries, and it then
5252
compiles the build system itself (this folder). Finally, it then invokes the
53-
actual `boostrap` binary build system.
53+
actual `bootstrap` binary build system.
5454
2. In Rust, `bootstrap` will slurp up all configuration, perform a number of
5555
sanity checks (compilers exist for example), and then start building the
5656
stage0 artifacts.

src/doc/book/patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Here, we bind the first and last element of the tuple to `x` and `z`, but
174174
ignore the middle element.
175175

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

179179
```rust
180180
let tuple: (u32, String) = (5, String::from("five"));

src/librustc/middle/lang_items.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use hir;
3737

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

272-
lets_do_this! {
272+
language_item_table! {
273273
// Variant name, Name, Method name;
274274
CharImplItem, "char", char_impl;
275275
StrImplItem, "str", str_impl;

src/librustc_lint/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
163163
},
164164
FutureIncompatibleInfo {
165165
id: LintId::of(INVALID_TYPE_PARAM_DEFAULT),
166-
reference: "PR 30742 <https://github.com/rust-lang/rust/pull/30724>",
166+
reference: "PR 30724 <https://github.com/rust-lang/rust/pull/30724>",
167167
},
168168
FutureIncompatibleInfo {
169169
id: LintId::of(SUPER_OR_SELF_IN_GLOBAL_PATH),

src/librustc_resolve/diagnostics.rs

+11
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,17 @@ Or:
843843
let unknown_variable = 12u32;
844844
let x = unknown_variable; // ok!
845845
```
846+
847+
If the item is not defined in the current module, it must be imported using a
848+
`use` statement, like so:
849+
850+
```ignore
851+
use foo::bar;
852+
bar();
853+
```
854+
855+
If the item you are importing is not defined in some super-module of the
856+
current module, then it must also be declared as public (e.g., `pub fn`).
846857
"##,
847858

848859
E0426: r##"

src/libstd/thread/mod.rs

+30
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,36 @@ impl<T> JoinInner<T> {
610610
/// Due to platform restrictions, it is not possible to `Clone` this
611611
/// handle: the ability to join a child thread is a uniquely-owned
612612
/// permission.
613+
///
614+
/// This `struct` is created by the [`thread::spawn`] function and the
615+
/// [`thread::Builder::spawn`] method.
616+
///
617+
/// # Examples
618+
///
619+
/// Creation from [`thread::spawn`]:
620+
///
621+
/// ```rust
622+
/// use std::thread;
623+
///
624+
/// let join_handle: thread::JoinHandle<_> = thread::spawn(|| {
625+
/// // some work here
626+
/// });
627+
/// ```
628+
///
629+
/// Creation from [`thread::Builder::spawn`]:
630+
///
631+
/// ```rust
632+
/// use std::thread;
633+
///
634+
/// let builder = thread::Builder::new();
635+
///
636+
/// let join_handle: thread::JoinHandle<_> = builder.spawn(|| {
637+
/// // some work here
638+
/// }).unwrap();
639+
/// ```
640+
///
641+
/// [`thread::spawn`]: fn.spawn.html
642+
/// [`thread::Builder::spawn`]: struct.Builder.html#method.spawn
613643
#[stable(feature = "rust1", since = "1.0.0")]
614644
pub struct JoinHandle<T>(JoinInner<T>);
615645

0 commit comments

Comments
 (0)