native: Always open a file with Open/Write modes

Previously, windows was using the CREATE_NEW flag which fails if the file
previously existed, which differed from the unix semantics. This alters the
opening to use the OPEN_ALWAYS flag to mirror the unix semantics.

Closes #13861
rustc: Remove the session building_library flag

This has long since not been too relevant since the introduction of many crate
type outputs. This commit removes the flag entirely, adjusting all logic to do
the most reasonable thing when building both a library and an executable.

Closes #13337
Remove/Update dead links on Tasks guide.
Add missing cases to the type_limits lint

and exhaustive testing for the `u8` type.
Remove two useless comparisons

according to the updated type_limits lint.
auto merge of #13905 : alexcrichton/rust/issue-13337, r=thestinger

This has long since not been too relevant since the introduction of many crate
type outputs. This commit removes the flag entirely, adjusting all logic to do
the most reasonable thing when building both a library and an executable.

Closes #13337
auto merge of #13865 : alexcrichton/rust/issue-13861, r=brson

Previously, windows was using the CREATE_NEW flag which fails if the file
previously existed, which differed from the unix semantics. This alters the
opening to use the OPEN_ALWAYS flag to mirror the unix semantics.

Closes #13861
Update minimum g++ version in documentation

Version changed due to a newer requirement in LLVM.
auto merge of #13924 : gmjosack/rust/master, r=alexcrichton

Most of the links I've removed are for types that don't exist anymore with the exception of `SendReceiver` though I'm not sure how useful it is to link to that without the accompanying `Receiver` and `Sender` and I don't know how useful those links are when they're discussed below and `channel`/`sync_channel` is on the `std::comm` page already linked.
Register new snapshots
auto merge of #13930 : alexcrichton/rust/snapshots, r=huonw

cc @pcwalton and @flaper87, this has box expressions and opt-in builtin kinds.
auto merge of #13936 : Armavica/rust/lint_check-range, r=kballard

Some cases were not correctly handled by this lint, for instance `let a = 42u8; a < 0` and `let a = 42u8; a > 255`.
It led to the discovery of two useless comparisons, which I removed.
auto merge of #13942 : JamesLaverack/rust/master, r=luqmana

Version changed due to a newer requirement in LLVM.
Reverse #13034

It has been found that #13034 was flawed and caused regression #13867.
This patch reveres the changes made by it except the companion tests.
Adjust codegen logic for range and guarded arms

By carefully distinguishing falling back to the default arm from moving
on to the next pattern, this patch adjusts the codegen logic for range
and guarded arms of pattern matching expression. It is a more
appropriate way of fixing #12582 and #13027 without causing regressions
such as #13867.

Closes #13867