Add example of estimating pi using Monte Carlo simulation to std::rand
Remove the dist function; it is more efficient to compare squared distances
Guide: patterns.

Fixes #4417.
Guide: iterators
Guide: array subscript notation
libcore: Get rid of useless mem::forget wrapper.
Change how libgetopts handles options grouped together

As soon as an option is found that takes an argument, consume the rest
of the string and store it into i_arg. Previously this would only happen
if the character after the option was not a recognized option.

Addresses issue #16348
Guide: ownership
Cargo begins version number at 0.0.1 instead of 0.1.0
Cargo generates "Hello, world!" instead of "Hello world!"
`input_num` is used is used instead of `guess` further in the guide
Use new Cargo file syntax
Use new Cargo starting version number
Remove repeated section and make file path generic
Add examples for some StrSlice methods.
doc: grammar fixes
doc: small tasks guide improvements
Fix TwoWaySearcher to work when used with periodic needles.

There is a check in TwoWaySearcher::new to determine whether the needle
is periodic. This is needed because during searching when a match fails,
we cannot advance the position by the entire length of the needle when
it is periodic, but can only advance by the length of the period.

The reason "bananas".contains("nana") (and similar searches) were
returning false was because the periodicity check was wrong.

Closes #16589
auto merge of #16618 : nham/rust/strslice_examples, r=alexcrichton

(By chance, the `contains` example was actually what I was trying to write when I discovered #16589)
auto merge of #16620 : tshepang/rust/tasks, r=steveklabnik