Forbid the Sized bound on unsized types

closes #16800
Remove the branch merging optimisations for slice patterns

They were only correct in the simplest case. Some of the optimisations
are certainly possible but should be introduced carefully and only
when the whole pattern codegen infrastructure is in a better shape.

Fixes #16648.
Rename `RawPtr::to_option()` to `RawPtr::as_ref()`

As outlined in

  https://aturon.github.io/style/naming/conversions.html

`to_` functions names should only be used for expensive operations.
Thus `to_option` is better named `as_option`. Also, putting type
names into method names is considered bad style; what the user is
really trying to get is a reference. This `as_ref` is even better.

Also, we are missing a mutable version of this method. So add a
new trait `RawMutPtr` with a corresponding `as_mut` methode.

Finally, there is a bug in the signature of `to_option` which has
been around since lifetime elision: originally the returned reference
had 'static lifetime, but since the elision changes this become
the lifetime of the raw pointer (which does not make sense, since
the pointer lifetime and referent lifetime are unrelated). Fix
the bug to return a reference with a fresh lifetime (which will
be inferred from the calling context).

[breaking-change]
Make doc search results use <a> tags instead of js for navigating

This has the primary advantage of not interfering with browser default
behavior for links like being able to cmd/ctrl+click on a result to open
the result in a new tab but leave the current page as-is (previous
behavior both opened a new tab and changed the current tab's location to
the result's)
Second approach - using type contents
Fix MIPS target

Add missing liblibc constants
Fix ICE when casting `&[T]` to `*const [T]`

Closes #16947
Handle custom deref returning fat pointers

Closes #16930
Enable a test for correct treatment of Sized?
bitv: add larger tests, better benchmarks & remove dead code.

There were no tests for iteration etc. with more than 5 elements,
i.e. not even going beyond a single word. This situation is rectified.

Also, the only benchmarks for `set` were with a constant bit value,
which was not indicative of every situation, due to inlining & branch
removal. This adds a benchmark at the other end of the spectrum: random
input.
libnative/io/file_unix: remove superfluous retry().

These syscalls don't return EINTR:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstatat.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/utime.html
auto merge of #16956 : nick29581/rust/unsized-test-1, r=alexcrichton

I landed this disabled, but it now passes since @pcwalton implemented RFC 11

r?
auto merge of #16634 : apoelstra/rust/to-option-fix, r=aturon

As outlined in

  https://aturon.github.io/style/naming/conversions.html

`to_` functions names should only be used for expensive operations.
Thus `to_option` is better named `as_option`. Also, putting type
names into method names is considered bad style; what the user is
really trying to get is a reference. This `as_ref` is even better.

Also, we are missing a mutable version of this method.

Finally, there is a bug in the signature of `to_option` which has
been around since lifetime elision: originally the returned reference
had 'static lifetime, but since the elision changes this become
the lifetime of the raw pointer (which does not make sense, since
the pointer lifetime and referent lifetime are unrelated). We fix
the bug to return a reference with a fresh lifetime which will be
inferred from the calling context.

[breaking-change]
auto merge of #16811 : nick29581/rust/dst-bug-2, r=nikomatsakis

closes #16800 
r? @nikomatsakis - I'm not 100% sure this is the right approach, it is kind of ad-hoc. The trouble is we don't have any intrinsic notion of which types are sized and which are not, we only have the Sized bound, so I have nothing to validate the Sized bound against.
libtime: Fix adding negative duration to Timespec.
auto merge of #16932 : crabtw/rust/mips, r=alexcrichton

Add missing liblibc constants
auto merge of #16953 : nick29581/rust/dst-bug-7, r=pcwalton

Closes #16947 

r?
Print file permissions in octal form.

Closes #16943.
auto merge of #16954 : nick29581/rust/dst-bug-deref, r=nikomatsakis

Closes #16930 

r?
auto merge of #16961 : huonw/rust/bitv-twiddle, r=alexcrichton

bitv: add larger tests, better benchmarks & remove dead code.

There were no tests for iteration etc. with more than 5 elements,
i.e. not even going beyond a single word. This situation is rectified.

Also, the only benchmarks for `set` were with a constant bit value,
which was not indicative of every situation, due to inlining & branch
removal. This adds a benchmark at the other end of the spectrum: random
input.