Skip to content

Commit 7beebbe

Browse files
committed
Auto merge of #29236 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29170, #29180, #29193, #29207, #29213, #29224, #29230 - Failed merges:
2 parents 83cf3ce + b51d5e1 commit 7beebbe

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Read ["Installing Rust"] from [The Book].
7272
$ pacman -S mingw-w64-i686-toolchain
7373
$ pacman -S mingw-w64-x86_64-toolchain
7474
75+
# Make git available in MSYS2 (if not already available on path)
76+
$ pacman -S git
77+
7578
$ pacman -S base-devel
7679
```
7780

src/doc/nomicon/atomics.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
% Atomics
22

33
Rust pretty blatantly just inherits C11's memory model for atomics. This is not
4-
due this model being particularly excellent or easy to understand. Indeed, this
5-
model is quite complex and known to have [several flaws][C11-busted]. Rather, it
6-
is a pragmatic concession to the fact that *everyone* is pretty bad at modeling
7-
atomics. At very least, we can benefit from existing tooling and research around
8-
C.
4+
due to this model being particularly excellent or easy to understand. Indeed,
5+
this model is quite complex and known to have [several flaws][C11-busted].
6+
Rather, it is a pragmatic concession to the fact that *everyone* is pretty bad
7+
at modeling atomics. At very least, we can benefit from existing tooling and
8+
research around C.
99

1010
Trying to fully explain the model in this book is fairly hopeless. It's defined
1111
in terms of madness-inducing causality graphs that require a full book to

src/doc/trpl/error-handling.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ cargo build --release
15451545

15461546
## Argument parsing
15471547

1548-
Let's get argument parsing out of the way. we won't go into too much
1548+
Let's get argument parsing out of the way. We won't go into too much
15491549
detail on Getopts, but there is [some good documentation][15]
15501550
describing it. The short story is that Getopts generates an argument
15511551
parser and a help message from a vector of options (The fact that it
@@ -1855,7 +1855,7 @@ In our program, we accept a single file for input and do one pass over the
18551855
data. This means we probably should be able to accept input on stdin. But maybe
18561856
we like the current format too—so let's have both!
18571857

1858-
Adding support for stdin is actually quite easy. There are only two things we
1858+
Adding support for stdin is actually quite easy. There are only three things we
18591859
have to do:
18601860

18611861
1. Tweak the program arguments so that a single parameter—the
@@ -2057,7 +2057,7 @@ so. This can be a little clumsy, especially if you intend for the program to
20572057
be used in shell scripts.
20582058

20592059
So let's start by adding the flags. Like before, we need to tweak the usage
2060-
string and add a flag to the Option variable. Once were done that, Getopts does the rest:
2060+
string and add a flag to the Option variable. Once we've done that, Getopts does the rest:
20612061

20622062
```rust,ignore
20632063
...

src/doc/trpl/hello-world.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ If we’re on Windows and not using PowerShell, the `~` may not work. Consult th
3737
documentation for our shell for more details.
3838

3939
Let’s make a new source file next. We’ll call our file `main.rs`. Rust files
40-
always end in a `.rs` extension. If we’re using more than one word in our
41-
filename, use an underscore: `hello_world.rs` rather than `helloworld.rs`.
40+
always end in a `.rs` extension, and if we’re using more than one word in a
41+
Rust filename, we use an underscore: for example, `linked_list.rs`, not
42+
`linkedlist.rs` or `LinkedList.rs`.
4243

4344
Now that we’ve got our file open, type this in:
4445

src/libcore/cell.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,6 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
784784
///
785785
/// unsafe impl<T> Sync for NotThreadSafe<T> {}
786786
/// ```
787-
///
788-
/// **NOTE:** `UnsafeCell<T>`'s fields are public to allow static initializers. It is not
789-
/// recommended to access its fields directly, `get` should be used instead.
790787
#[lang = "unsafe_cell"]
791788
#[stable(feature = "rust1", since = "1.0.0")]
792789
pub struct UnsafeCell<T: ?Sized> {
@@ -799,8 +796,7 @@ impl<T> UnsafeCell<T> {
799796
/// Constructs a new instance of `UnsafeCell` which will wrap the specified
800797
/// value.
801798
///
802-
/// All access to the inner value through methods is `unsafe`, and it is highly discouraged to
803-
/// access the fields directly.
799+
/// All access to the inner value through methods is `unsafe`.
804800
///
805801
/// # Examples
806802
///

src/libstd/io/cursor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use slice;
6969
/// use std::io::Cursor;
7070
/// let mut buff = Cursor::new(vec![0; 15]);
7171
///
72-
/// write_ten_bytes(&mut buff).unwrap();
72+
/// write_ten_bytes_at_end(&mut buff).unwrap();
7373
///
7474
/// assert_eq!(&buff.get_ref()[5..15], &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
7575
/// }

0 commit comments

Comments
 (0)