doc/guide-ffi: A few minor typo/language fixes

Signed-off-by: Anton Lofgren <alofgren@op5.com>
Add example for str replace() and MaybeOwned

  - for 3 implementations of into_maybe_owned()
  - is_slice()
  - is_owned()
Define a new setting g:rust_fold

g:rust_fold allows folding to be enabled. This lets the user turn on
folding without having to define autocommands.
Set softtabstop, textwidth, and optionally colorcolumn

Setting softtabstop makes <Del> delete 4 spaces as if it were a tab.

Setting textwidth allows comments to be wrapped automatically. It's set
at 80, which is the recommended line length for Rust programs. There are
suggestions that it should be 79, but our current style guide says 80 so
that's what we're matching.

A new setting g:rust_colorcolumn sets colorcolumn as well, to +1,101.
This indicates both the textwidth and the second stricter line length of
100 that our style guide lists.
Remove rust_colorcolumn, set textwidth to 99

The latest change to aturon/rust-guidelines states that lines must not
exceed 99 characters. This gets rid of the 80/100 split, so we don't
need to customize colorcolumn amymore.
Guide: match
Guide: looping
Guide: Standard input
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.
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
Convert a first batch of diagnostics to have error codes
Fix Documentation Typo in libstd
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.