Rewrite of a paragraph in in the `match` section.
The colon `:` should be used only when the sentence preceeding it is a
complete sentence. If this is not the case, then a `;` should be used;
this denotes that the following fragment is a part of the previous
fragment.
I got a new bike; it has two wheels. (Similar to I got a new bike, it has two wheels)
The ice cream truck has great flavours; blueberry, blackberry, berryberry.
Writing a complete sentence:
- with a list under it
- You can join two sentences with it: Much like this.
r? @steveklabnik
The current explanation for scan() is not very clear as to how it works, especially when it compares itself to fold().
I believe these changes makes it all a bit more clear for the reader, and makes it easier to understand the example code.
r? @steveklabnik
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`.
I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as `#[cfg(not(test))]`
When using `cc` for linking rustc will, if gold is available (by looking for `/usr/bin/ld.gold`), pass `-fuse-ld=gold` to `cc`.
In some scenarios gold links much faster than ld. Servo uses it to considerably speed up linking. gold behaves nearly identically to ld (though I think there are rare corner cases that don't work still). I've run this through crater and everything there continues to link.
To disable, pass `-C disable-gold`.
`auto_ref()` currently returns an Rvalue datum for the ref'd value,
which is fine for thin pointers, but for fat pointers this means that
once the pointer is moved out of that datum, its memory will be marked
as dead. And because there is not necessarily an intermediate temporary
involved we can end up marking memory as dead that is actually still
used.
As I don't want to break the micro-optimization for thin pointers by
always returning an Lvalue datum, I decided to only do so for fat
pointers.
Fix#30478
Didn't build/test the change, but if that one-character fix isn't correct, I'll eat my hat. :-) Found this reading the book over the last week or two since Mozlando -- much enjoying the book so far.
`auto_ref()` currently returns an Rvalue datum for the ref'd value,
which is fine for thin pointers, but for fat pointers this means that
once the pointer is moved out of that datum, its memory will be marked
as dead. And because there is not necessarily an intermediate temporary
involved we can end up marking memory as dead that is actually still
used.
As I don't want to break the micro-optimization for thin pointers by
always returning an Lvalue datum, I decided to only do so for fat
pointers.
Fix#30478