Use defvar for rust-top-item-beg-re instead

Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
Implement fallbacks for functions unavailable in older versions of Windows
Add documentation for Windows compatibility layer and remove unneeded attributes
Move Windows compatibility layer to libnative
librand: Revise crypto part of document

This patch adds document which explains when to use `OSRng` in
cryptographic context, and explains why we use `/dev/urandom` instead
of `/dev/random`.
auto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelix

Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
auto merge of #13932 : MrAlert/rust/win-compat, r=brson

This addresses #12842 by offering fallback implementations for functions that aren't available.

In this case, as Windows XP simply doesn't support symbolic links at all, the fallbacks simply return an error code indicating that the function hasn't been implemented. This should allow programs written in Rust to run under XP while still offering full support for symbolic links under newer versions of Windows with the same binary, but due to LLVM using stderror_s(), which isn't available in msvcrt.dll in XP, rustc itself will not.

The fallback implementation is as follows:

Calling the function instead calls to a mutable function pointer. This in and of itself would not constitute a performance hit because DLL calls are implemented in a similar manner (see Import Address Table). The function pointer initially points to a thunk which tries to get the address of the associated function and write it back to the function pointer. If it fails to find the function, it instead writes the address to a fallback. As this operation is idempotent, reading and writing the pointer simply needs to be atomic. Subsequent calls to the function should be as fast as any other DLL call, as the pointer will then point directly to either the correct function or a fallback.
librustc: Remove all uses of `~str` from librustc.
librustdoc: Remove all `~str` usage from librustdoc.
auto merge of #14157 : pcwalton/rust/detildestr-rustdoc, r=pcwalton

r? @brson
Fix typos in rustc manpage
Add the patch number to version strings. Closes #13289
rustdoc: Fix hiding implementations of traits

This bug was introduced when rustdoc gained the ability to hyperlink across
crates in pub use statements.

Closes #14125
add shebang to scripts that have execute bit set
libcore: remove fails from slice.rs and remove duplicated length checking

core::slice::raw::{shift_ptr,pop_ptr} now returns Option<*T> rather than
*T. They no longer fail on empty slices.

[breaking-change]
Make ProcessOutput Eq, TotalEq, Clone
doc: updates rust manual (loop to continue)

Keyword for continue expressions was changed from loop to continue, but the
manual was not updated.
doc: Update the linkage documentation

After allowing mixing rlibs and dylibs in #13892, the documentation was not
updated accordingly to reflect this new capability.
Remove an unnecessary .move_iter().collect()
Add some long-overdue documentation on the INTERPOLATED helper macros.