auto merge of #18171 : jakub-/rust/match-typeck, r=pcwalton

Rather than doing it top-down, with a known expected type, we will now simply establish the appropriate constraints between the pattern and the expression it destructures.

Closes #8783.
Closes #10200.
Deprecate UdpStream
auto merge of #18176 : jkleint/rust/guide-borrow-wording, r=steveklabnik

Explain the primary disadvantage of garbage collection is runtime
overhead and unpredictable pauses.  Elucidate where the name "race
condition" comes from.  Emphasize that Rust can guarantee your code is
free of race conditions and other memory errors, with no runtime
overhead.

cc @steveklabnik
Guide: Fix off-by-one error
Make MIN_ALIGN a const to allow better optimization

With MIN_ALIGN as a static, other crates don't have access to its value
at compile time, because it is an extern global. That means that the
checks against it can't be optimized out, which is rather unfortunate.
So let's make it a constant instead.
rm unnecessary libc allocator usage
Prevent pointer -> int casts in constexprs

These cause issues, as addresses aren't fixed at compile-time.

Fixes #18294
make the core::raw struct representation defined

Closes #18313
get rid of libc_heap::{malloc_raw, realloc_raw}

The C standard library functions should be used directly. The quirky
NULL / zero-size allocation workaround is no longer necessary and was
adding an extra branch to the allocator code path in a build without
jemalloc. This is a small step towards liballoc being compatible with
handling OOM errors instead of aborting (#18292).

[breaking-change]
return the new usable size from reallocate_inplace

The real size is also more useful than just a boolean, and the caller
can easily determine if the operation failed from the real size. In most
cases, the caller is only going to be growing the allocation so a branch
can be avoided.

[breaking-change]
fix sized deallocation documentation
Guide: drop :d formatting where unnecessary
auto merge of #18293 : thestinger/rust/heap, r=cmr
Guide: Cargo now adds bang and drops the semicolon for ‘Hello, world’
Guide: update Testing output and fix contents to match
Add test cases for E-needstest issues
Add Span and separate open/close delims to TTDelim

This came up when working [on the gl-rs generator extension](https://github.com/bjz/gl-rs/blob/990383de801bd2e233159d5be07c9b5622827620/src/gl_generator/lib.rs#L135-L146).

The new definition of  `TTDelim` adds an associated `Span` that covers the whole token tree and enforces the invariant that a delimited sequence of token trees must have an opening and closing delimiter.

A `get_span` method has also been added to `TokenTree` type to make it easier to implement better error messages for syntax extensions.
Rename TokenTree variants for clarity

This should be clearer, and fits in better with the `TTNonterminal` variant.

Renames:

- `TTTok` -> `TTToken`
- `TTDelim` -> `TTDelimited`
- `TTSeq` -> `TTSequence`
Prevent some vector reallocations
Use standard capitalisation for TokenTree variants