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
configure: Recognize i686 build on msys2
Add support for trailing commas in more places

This lets the parser understand trailing commas in method calls, method
definitions, enum variants, and type parameters.

Closes #14240.
Closes #15887.
Improve TwoWaySearcher comments.
test: Convert Window path to MSYS path

When MSYS shell executes program, if its arguments look like MSYS paths,
MSYS automatically converts them into Windows paths.
For example, `/c/path:/d/path` becomes `C:\path;D:\path`.
However, if there is only one path e.g. `/c/path`, it becomes `C:/path`.

maketest.py reverts the behavior to reduce confusion between MSYS and
Windows, but it didn't handle the `/c/path` case. This patch fixes the
issue.

Fixes #15297
Fixes #15250
Add test for #10618 and #16382

Closes #10618
Closes #16382
libunicode: optimize char functions for ascii characters
core: Separate failure formatting in str methods slice, slice_to, slice_from

Use a separate inline-never function to format failure message for
str::slice() errors.

Using strcat's idea, this makes sure no formatting code from failure is
inlined when str::slice() is inlined. The number of `unreachable` being
inlined when usingi `.slice()` drops from 5 to just 1.
Guide: Make add_three_times_four() public
std: Use concat! and stringify! to simplify the most common assert! case.

With no custom message, we should just use concat! + stringify! for
`assert!(expr)`.

Inspired by issue #16625
auto merge of #16268 : cakebaker/rust/make_fn_add_three_times_four_public, r=steveklabnik

To avoid a compilation error when running the tests the function has to be public.
Test case to illustate/reproduce bug.
Copy only up to `min(new_size, old_size)` when doing reallocate.

Fix #16687
auto merge of #16612 : nham/rust/twoway_searcher_fix, r=alexcrichton

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

Also, thanks to @Gankro, who came up with many buggy examples.
auto merge of #16670 : Swatinem/rust/charascii, r=alexcrichton

I was doing a lot of parsing ascii strings, and the generic bsearch functions in `tables.rs` came up very high in the profile.
This should avoid calling those functions for simple ASCII range chars.
Log linker stderr and stdout.
auto merge of #16691 : klutzy/rust/issue-15297, r=alexcrichton

First commit fixes issue regarding recognizing MSYS2 build.
Second commit fixes issue regarding MSYS/Windows paths.
Enable the MergeFunc pass

Fixes #9536
auto merge of #16697 : Sawyer47/rust/new-test, r=huonw

Closes #10618
Closes #16382
doc: move misplaced comma

Also:

* Remove unseeming repetition.
* By now, the reader has already heard that Rust is safe by default, so
reduce the overlong sentence, making it easier to read.