Make some NullablePointer enums FFI-compatible with the base pointer type.
librustc: Separate NullablePointer into RawNullablePointer and StructWrappedNullablePointer.
std: Refactor liballoc out of lib{std,sync}

This commit is part of the libstd facade RFC, issue #13851. This creates a new
library, liballoc, which is intended to be the core allocation library for all
of Rust. It is pinned on the basic assumption that an allocation failure is an
abort or failure.

This module has inherited the heap/libc_heap modules from std::rt, the owned/rc
modules from std, and the arc module from libsync. These three pointers are
currently the three most core pointer implementations in Rust.

The UnsafeArc type in std::sync should be considered deprecated and replaced by
Arc<Unsafe<T>>. This commit does not currently migrate to this type, but future
commits will continue this refactoring.
Register new snapshots
auto merge of #14230 : alexcrichton/rust/liballoc, r=cmr,huonw

This commit is part of the libstd facade RFC, issue #13851. This creates a new
library, liballoc, which is intended to be the core allocation library for all
of Rust. It is pinned on the basic assumption that an allocation failure is an
abort or failure.

This module has inherited the heap/libc_heap modules from std::rt, the owned/rc
modules from std, and the arc module from libsync. These three pointers are
currently the three most core pointer implementations in Rust.

The UnsafeArc type in std::sync should be considered deprecated and replaced by
`Arc<Unsafe<T>>`. This commit does not currently migrate to this type, but future
commits will continue this refactoring.
core: Clarify the documentation on core's prelude

Closes #14246
core: Document FormatWriter and allow `write!`

This commit fills in the documentation holes for the FormatWriter trait which
were previously accidentally left blank. Additionally, this adds the `write_fmt`
method to the trait to allow usage of the `write!` macro with implementors of
the `FormatWriter` trait. This is not useful for consumers of the standard
library who should generally avoid the `FormatWriter` trait, but it is useful
for consumers of the core library who are not using the standard library.
Advice to use Box<T> not ~T
auto merge of #14249 : alexcrichton/rust/issue-14246, r=huonw

Closes #14246
Update debuginfo tests.
auto merge of #14121 : luqmana/rust/option-ffi, r=alexcrichton

This slightly adjusts the NullablePointer representation for some enums in the case where the non-nullable variant has a single field (the ptr field) to be just that, the pointer. This is in contrast to the current behaviour where we'd wrap that single pointer in a LLVM struct.

Fixes #11040 & #11303.
auto merge of #14258 : alexcrichton/rust/dox-format-writer, r=cmr

This commit fills in the documentation holes for the FormatWriter trait which
were previously accidentally left blank. Additionally, this adds the `write_fmt`
method to the trait to allow usage of the `write!` macro with implementors of
the `FormatWriter` trait. This is not useful for consumers of the standard
library who should generally avoid the `FormatWriter` trait, but it is useful
for consumers of the core library who are not using the standard library.
auto merge of #14274 : youknowone/rust/advice-tilt-to-box, r=thestinger
Make bytes!() return 'static

Change `bytes!()` to return

    {
        static BYTES: &'static [u8] = &[...];
        BYTES
    }

This gives it the `'static` lifetime, whereas before it had an rvalue
lifetime. Until recently this would have prevented assigning `bytes!()`
to a static, as in

    static FOO: &'static [u8] = bytes!(1,2,3);

but #14183 fixed it so blocks are now allowed in constant expressions
(with restrictions).

Fixes #11641.
auto merge of #14275 : kballard/rust/bytes-return-static, r=huonw

Change `bytes!()` to return

    {
        static BYTES: &'static [u8] = &[...];
        BYTES
    }

This gives it the `'static` lifetime, whereas before it had an rvalue
lifetime. Until recently this would have prevented assigning `bytes!()`
to a static, as in

    static FOO: &'static [u8] = bytes!(1,2,3);

but #14183 fixed it so blocks are now allowed in constant expressions
(with restrictions).

Fixes #11641.
Add libhtml

libhtml provides escaping/unescaping of HTML entities. It matches the
HTML5 parsing rules as closely as possible. It provides convenience
functions to escape/unescape, helpers to perform the escaping/unescaping
during Show, and Writers that can escape/unescape in a streaming manner.

References:
http://www.w3.org/html/wg/drafts/html/CR/syntax.html
libhtml: Add a few more benchmarks
libhtml: Add tests, support &#X

Add a bunch of tests taken from cpython's html module, along with a
couple of other homegrown ones.

Add support for &#X123; entities, with the capital X, which was
forgotten before.
libhtml: Fix edge case in entity parsing

When a named entity is aborted, we need to backtrack to the longest
prefix that doesn't require a semicolon.
Remove EscapeAll mode

EscapeAll tries to escape all non-ASCII characters. Unfortunately, HTML5
numeric entities can't represent most codepoints between U+0080 and
U+009F. The only way to handle those is to use XML entity rules, but
this is an HTML5 entity library.

Also change &apos; to &#39;. It turns out &apos; isn't part of HTML
until HTML5, so using &#39; is more compatible with pre-HTML5 parsers.