Add example for str replace() and MaybeOwned

  - for 3 implementations of into_maybe_owned()
  - is_slice()
  - is_owned()
rustc: Always mark #[crate_name] as used

It's just an annoying error if you use --crate-name on the command line and you
also have a #[crate_name] specified
rustc: Exclude #[repr(C)] from non camel case

C structs predominately do not use camel case identifiers, and we have a clear
indicator for what's a C struct now, so excuse all of them from this stylistic
lint.
rustdoc: render 1-tuples as (T,) instead of (T)
Fix spans for attributes

They used to be one token too long, so you'd see things like
```
rust/rust/test.rs:1:1: 2:2 warning: unused attribute,
rust/rust/test.rs:1 #![foo]
rust/rust/test.rs:2 #![bar]
```
instead of
```
test.rs:1:1: 1:8 warning: unused attribute, #[warn(unused_attribute)] on
by default
test.rs:1 #![foo]
          ^~~~~~~
```
libc: Switch open to use a mode_t on unix

While I'm at it, export O_SYNC with the other flags that are exported.

Closes #15582
Fix Documentation Typo in libstd
auto merge of #15614 : lucidd/rust/#15474, r=alexcrichton

This fixes #15474
auto merge of #15621 : sfackler/rust/attr-span, r=cmr

They used to be one token too long, so you'd see things like
```
rust/rust/test.rs:1:1: 2:2 warning: unused attribute,
rust/rust/test.rs:1 #![foo]
rust/rust/test.rs:2 #![bar]
```
instead of
```
test.rs:1:1: 1:8 warning: unused attribute, #[warn(unused_attribute)] on
by default
test.rs:1 #![foo]
          ^~~~~~~
```
Use a nicer Show impl for Name
auto merge of #15584 : alexcrichton/rust/warn-annoyances, r=cmr

* Don't warn about `#[crate_name]` if `--crate-name` is specified
* Don't warn about non camel case identifiers on `#[repr(C)]` structs
* Switch `mode` to `mode_t` in libc.
Implement Hash trait for TreeSet and TreeMap.
auto merge of #15633 : nham/rust/hash_treeset, r=alexcrichton

cc #15294
auto merge of #15639 : supr/rust/master, r=sfackler

* Fixes a typo in the libstd documentation, referring UPD instead of UDP
Add an iterate function to core::iter

Implementation by Kevin Ballard.

The function returns an Unfold iterator producing an infinite stream
of results of repeated applications of the function, starting from
the provided seed value.
auto merge of #15507 : jakub-/rust/iterate, r=alexcrichton

The new iterator takes a function and produces an infinite stream
of results of repeated applications of the function, starting from
the provided seed value.
refactor Method definition to make space for macros

This change propagates to many locations, but because of the
Macro Exterminator (or, more properly, the invariant that it
protects), macro invocations can't occur downstream of expansion.
This means that in librustc and librustdoc, extracting the
desired field can simply assume that it can't be a macro
invocation. Functions in ast_util abstract over this check.
test case for method macros
macro method unit test case fix
update fold_method to return a smallvector

This is nice for macros, to allow them to expand into multiple methods