auto merge of #19152 : alexcrichton/rust/issue-17863, r=aturon

This commit is an implementation of [RFC 240][rfc] when applied to the standard
library. It primarily deprecates the entirety of `string::raw`, `vec::raw`,
`slice::raw`, and `str::raw` in favor of associated functions, methods, and
other free functions. The detailed renaming is:

* slice::raw::buf_as_slice => slice::from_raw_buf
* slice::raw::mut_buf_as_slice => slice::from_raw_mut_buf
* slice::shift_ptr => deprecated with no replacement
* slice::pop_ptr => deprecated with no replacement
* str::raw::from_utf8 => str::from_utf8_unchecked
* str::raw::c_str_to_static_slice => str::from_c_str
* str::raw::slice_bytes => deprecated for slice_unchecked (slight semantic diff)
* str::raw::slice_unchecked => str.slice_unchecked
* string::raw::from_parts => String::from_raw_parts
* string::raw::from_buf_len => String::from_raw_buf_len
* string::raw::from_buf => String::from_raw_buf
* string::raw::from_utf8 => String::from_utf8_unchecked
* vec::raw::from_buf => Vec::from_raw_buf

All previous functions exist in their `#[deprecated]` form, and the deprecation
messages indicate how to migrate to the newer variants.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0240-unsafe-api-location.md
[breaking-change]

Closes #17863
auto merge of #18856 : ruud-v-a/rust/fatptrs, r=cmr

This merges the `trt_field_*`, `fn_field_*` and `slice_elt_*` constants into two `fat_ptr_*` constants. This resolves the first part of #18590.
auto merge of #19157 : aturon/rust/cow-doc, r=alexcrichton

This commit makes `Cow` more usable by allowing it to be applied to
unsized types (as was intended) and providing some basic `ToOwned`
implementations on slice types. It also corrects the documentation for
`Cow` to no longer mention `DerefMut`, and adds an example.

Closes #19123
libsyntax: Forbid type parameters in tuple indices

This breaks code like

```
let t = (42i, 42i);
... t.0::<int> ...;
```

Change this code to not contain an unused type parameter. For example:

```
let t = (42i, 42i);
... t.0 ...;
```

Closes https://github.com/rust-lang/rust/issues/19096

[breaking-change]
Remove type parameters from ExprField and ExprTupField
auto merge of #19158 : jakub-/rust/issue-14091, r=alexcrichton

Closes #14091.
Closes #19195.
Add test
libcollection: generalize StrVector to AsSlice<Str>.

The impl for [T] also works as impl for slices in general.
By generalizing the impl of StrVector for Vec<Str> to that for
AsSlice<Str>, it becomes much more generic.

Once Iterable is implemented, we will prefer it to AsSlice.
But the with_capacity() part might become tricky.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
Search for implemented kinds recursively on Trait types. Fixes #15155 and #13155.
Fix the reason for calling a file lib.rs
auto merge of #18140 : JelteF/rust-1/guide-fix, r=cmr

The reason given didn't make any sense when I read it when reading through the docs. I think this is more clear. Please let me know it is also more correct.
fix for PR#16552 implementation on windows: CFG_LIBDIR should be always set in configure variables
auto merge of #19150 : Manishearth/rust/find-doc, r=Gankro

It's useful to know this (opens up a bunch of other opportunities especially whilst parsing)
Clean up some logic/formatting in JSON module
DSTify Str + impl Str for &S where S: Str
Require <T: Send> for AtomicOption

Fixes #19247.
rollup merge of #19161: jmesmon/mk-fixes

This is a collection of misc issues I've run into while adding bindir & libdir support that aren't really bindir & libdir specific.

While I continue to fiddle with bindir and libdir bugs, I figured these might be useful for others to have merged.
rollup merge of #19166: richo/lldb-cleanups

While poking at rust in lldb I found a few nits to clean up.
rollup merge of #19184: Gekkio/fix-binary-format-char

This small piece of documentation was missed in the format character change
in 4af3494bb02e80badc978faa65e59625ade0c675.
rollup merge of #19193: scialex/rc-counts

These functions allow you to see how many weak and strong references
there are to an `Arc`, `Rc`, or an `rc::Weak`. Due to the design of
`Arc` it is not possible to get the number of weak references of an
arbitrary `arc::Weak`. Look in `arc.rs` for a more in-depth explanation.

On `arc::Arc` and `arc::Weak` these operations are wait-free and atomic.

This sort of information is useful for creating dynamically cleared caches for use in OS development, for example holding pages of files in memory until the address space is needed for something else.