rust-mode.el: Tweak syntax table

"_" should keep the default syntax class (symbol, not word). This
allows, e.g., `forward-word' to behave in the familiar way, jumping to
underscores within a function or variable name.
doc: adding example for implementations without traits
sys: reveal std::io representation to sys module

This commit adds a `AsInner` trait to `sys_common` and provides
implementations on many `std::io` types. This is a building block for
exposing platform-specific APIs that hook into `std::io` types.
libs: add std::os::unix module

The new `std::os::unix` module exposes several extension traits
for extracting file descriptors from `std::io` types.
libs: add std::os::windows module

The new `std::os::windows` module exposes several extension traits
for extracting file descriptors, sockets, and handles from `std::io`
types.
Search for implemented kinds recursively on Trait types. Fixes #15155 and #13155.
DSTify Str + impl Str for &S where S: Str
Require <T: Send> for AtomicOption

Fixes #19247.
add MoveItems to RingBuf, fixes #19085
Rename unwrap functions to into_inner

This change applies the conventions to unwrap listed in [RFC 430][rfc] to rename
non-failing `unwrap` methods to `into_inner`. This is a breaking change, but all
`unwrap` methods are retained as `#[deprecated]` for the near future. To update
code rename `unwrap` method calls to `into_inner`.

[rfc]: https://github.com/rust-lang/rfcs/pull/430
[breaking-change]

Closes #13159
cc #19091
Implement into_iter() for BinaryHeap.
save-analysis: two minor bugs
std: Add a new top-level thread_local module

This commit removes the `std::local_data` module in favor of a new
`std::thread_local` module providing thread local storage. The module provides
two variants of TLS: one which owns its contents and one which is based on
scoped references. Each implementation has pros and cons listed in the
documentation.

Both flavors have accessors through a function called `with` which yield a
reference to a closure provided. Both flavors also panic if a reference cannot
be yielded and provide a function to test whether an access would panic or not.
This is an implementation of [RFC 461][rfc] and full details can be found in
that RFC.

This is a breaking change due to the removal of the `std::local_data` module.
All users can migrate to the new thread local system like so:

    thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None)))

The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as
an implementation detail which must now be explicitly stated by users.

[rfc]: https://github.com/rust-lang/rfcs/pull/461
[breaking-change]
auto merge of #19236 : csouth3/rust/master, r=Gankro

Whilst browsing the source for BinaryHeap, I saw a FIXME for implementing into_iter.  I think, since the BinaryHeap is represented internally using just a Vec, just calling into_iter() on the BinaryHeap's data should be sufficient to do what we want here.  If this actually isn't the right approach (e.g., I should write a struct MoveItems and appropriate implementation for BinaryHeap instead), let me know and I'll happily rework this.

Both of the tests that I have added pass.  This is my first contribution to Rust, so please let me know any ways I can improve this PR!
auto merge of #19094 : alexcrichton/rust/rm-std-local-data, r=aturon

This commit removes the `std::local_data` module in favor of a new `std::thread_local`
module providing thread local storage. The module provides two variants of TLS:
one which owns its contents and one which is based on scoped references. Each
implementation has pros and cons listed in the documentation.

Both flavors have accessors through a function called `with` which yield a
reference to a closure provided. Both flavors also panic if a reference cannot
be yielded and provide a function to test whether an access would panic or not.
This is an implementation of [RFC 461][rfc] and full details can be found in
that RFC.

This is a breaking change due to the removal of the `std::local_data` module.
All users can migrate to the new tls system like so:

    thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None)))

The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as
an implementation detail which must now be explicitly stated by users.

[rfc]: https://github.com/rust-lang/rfcs/pull/461
[breaking-change]
auto merge of #19248 : japaric/rust/str, r=alexcrichton

Just like we do with AsSlice

This comes in handy when dealing with iterator-centric APIs (`IntoIterator`!) and you want to receive an `Iterator<S> where S: Str` argument. Without this PR, e.g. you can't receive `&["a", "b"].iter()` instead you'll have to type `&["a", "b"].iter().map(|&x| x)` (A similar thing happens with `&[String]`).

r? @aturon 

Full disclaimer: I haven't run `make`/`make check` yet (All my cores are busy)
compiletest: extend syntax with support for choosing same line as previous line.
Add `node_to_user_string`, `node_to_string` variant that drops id from output.
rustdoc: Render associated types on traits and impls
rustdoc: render ast::QPath

Fix #18594