diff --git a/README.md b/README.md index a040ff0921a..9d85487f793 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,9 @@ Read ["Installing Rust"] from [The Book]. $ pacman -S mingw-w64-i686-toolchain $ pacman -S mingw-w64-x86_64-toolchain + # Make git available in MSYS2 (if not already available on path) + $ pacman -S git + $ pacman -S base-devel ``` diff --git a/src/doc/nomicon/atomics.md b/src/doc/nomicon/atomics.md index 08f0de4f006..1efca08abd0 100644 --- a/src/doc/nomicon/atomics.md +++ b/src/doc/nomicon/atomics.md @@ -1,11 +1,11 @@ % Atomics Rust pretty blatantly just inherits C11's memory model for atomics. This is not -due this model being particularly excellent or easy to understand. Indeed, this -model is quite complex and known to have [several flaws][C11-busted]. Rather, it -is a pragmatic concession to the fact that *everyone* is pretty bad at modeling -atomics. At very least, we can benefit from existing tooling and research around -C. +due to this model being particularly excellent or easy to understand. Indeed, +this model is quite complex and known to have [several flaws][C11-busted]. +Rather, it is a pragmatic concession to the fact that *everyone* is pretty bad +at modeling atomics. At very least, we can benefit from existing tooling and +research around C. Trying to fully explain the model in this book is fairly hopeless. It's defined in terms of madness-inducing causality graphs that require a full book to diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index bbc827a0d0e..56dfa17b4e3 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -1545,7 +1545,7 @@ cargo build --release ## Argument parsing -Let's get argument parsing out of the way. we won't go into too much +Let's get argument parsing out of the way. We won't go into too much detail on Getopts, but there is [some good documentation][15] describing it. The short story is that Getopts generates an argument 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 data. This means we probably should be able to accept input on stdin. But maybe we like the current format too—so let's have both! -Adding support for stdin is actually quite easy. There are only two things we +Adding support for stdin is actually quite easy. There are only three things we have to do: 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 be used in shell scripts. So let's start by adding the flags. Like before, we need to tweak the usage -string and add a flag to the Option variable. Once were done that, Getopts does the rest: +string and add a flag to the Option variable. Once we've done that, Getopts does the rest: ```rust,ignore ... diff --git a/src/doc/trpl/hello-world.md b/src/doc/trpl/hello-world.md index c3de956d29d..2f9166751d9 100644 --- a/src/doc/trpl/hello-world.md +++ b/src/doc/trpl/hello-world.md @@ -37,8 +37,9 @@ If we’re on Windows and not using PowerShell, the `~` may not work. Consult th documentation for our shell for more details. Let’s make a new source file next. We’ll call our file `main.rs`. Rust files -always end in a `.rs` extension. If we’re using more than one word in our -filename, use an underscore: `hello_world.rs` rather than `helloworld.rs`. +always end in a `.rs` extension, and if we’re using more than one word in a +Rust filename, we use an underscore: for example, `linked_list.rs`, not +`linkedlist.rs` or `LinkedList.rs`. Now that we’ve got our file open, type this in: diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 1b4af44da46..0d717992ce8 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -784,9 +784,6 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> { /// /// unsafe impl Sync for NotThreadSafe {} /// ``` -/// -/// **NOTE:** `UnsafeCell`'s fields are public to allow static initializers. It is not -/// recommended to access its fields directly, `get` should be used instead. #[lang = "unsafe_cell"] #[stable(feature = "rust1", since = "1.0.0")] pub struct UnsafeCell { @@ -799,8 +796,7 @@ impl UnsafeCell { /// Constructs a new instance of `UnsafeCell` which will wrap the specified /// value. /// - /// All access to the inner value through methods is `unsafe`, and it is highly discouraged to - /// access the fields directly. + /// All access to the inner value through methods is `unsafe`. /// /// # Examples /// diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 7bca5359690..e4f00c4874e 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -69,7 +69,7 @@ use slice; /// use std::io::Cursor; /// let mut buff = Cursor::new(vec![0; 15]); /// -/// write_ten_bytes(&mut buff).unwrap(); +/// write_ten_bytes_at_end(&mut buff).unwrap(); /// /// assert_eq!(&buff.get_ref()[5..15], &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); /// }