libstd: Change `slice_shift_char`, `shift_char`, `pop_char`, `shift_byte` and `pop_byte` to return an Option instead of failing
libstd: Add unit tests for `slice_shift_char`
libstd: Update docs for `slice_shift_char` and {shift,pop}_{char,byte}
debuginfo: Improve commandline option handling for debuginfo (fixes #12811)

The `-g` flag does not take an argument anymore while the argument to `--debuginfo` becomes mandatory. This change makes it possible again to run the compiler like this:

`rustc -g ./file.rs`

This did not work before because `./file.rs` was misinterpreted as the argument to `-g`. In order to get limited debuginfo, one now has to use `--debuginfo=1`.
Bundle libbacktrace with the compiler

This will soon be used to print backtraces on failure
Port partition method from ~[T] to Vec<T>, for use early-late lifetime code.
Alpha-rename `.ident` fields of type `Name` to `.name`.
alpha-rename .ident to .name in Lifetime, including in rustdoc.
Introduce Scope<'a> shorthand for &'a ScopeChain<'a>.
Changed lists of lifetimes in ast and ty to use Vec instead of OptVec.

There is a broader revision (that does this across the board) pending
in #12675, but that is awaiting the arrival of more data (to decide
whether to keep OptVec alive by using a non-Vec internally).

For this code, the representation of lifetime lists needs to be the
same in both ScopeChain and in the ast and ty structures.  So it
seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper
empty representation than the current `vec` code.
Add proper support for early/late distinction for lifetime bindings.
Uses newly added Vec::partition method to simplify resolve_lifetime.
auto merge of #12807 : pnkfelix/rust/fsk-issue5121-fns-with-early-lifetime-params, r=pnkfelix

Fix issue #5121: Add proper support for early/late distinction for lifetime bindings.

There are some little refactoring cleanups as separate commits; the real meat that has the actual fix is in the final commit.

The original author of the work was @nikomatsakis; I have reviewed it, revised it slightly, refactored it into these separate commits, and done some rebasing work.
auto merge of #12816 : michaelwoerister/rust/limited-debuginfo, r=alexcrichton

Fixes #12811 as described in the issue.
auto merge of #12797 : pczarn/rust/str_safety, r=huonw

Along the lines of `shift_ref` and `pop_ref`.
Add shift and remove methods for Vec
Update last_span in replace_token
Suggest explicit lifetime parameter on some errors

Some types of error are caused by missing lifetime parameter on function
or method declaration. In such cases, this commit generates some
suggestion about what the function declaration could be. This does not
support method declaration yet.
std: Relax an assertion in oneshot selection

The assertion was erroneously ensuring that there was no data on the port when
the port had selection aborted on it. This assertion was written in error
because it's possible for data to be waiting on a port, even after it was
disconnected. When aborting selection, if we see that there's data on the port,
then we return true that data is available on the port.

Closes #12802
green: Fix a scheduler assertion on yielding

This commit fixes a small bug in the green scheduler where a scheduler task
calling `maybe_yield` would trip the assertion that `self.yield_check_count > 0`

This behavior was seen when a scheduler task was scheduled many times
successively, sending messages in a loop (via the channel `send` method), which
in turn invokes `maybe_yield`. Yielding on a sched task doesn't make sense
because as soon as it's done it will implicitly do a yield, and for this reason
the yield check is just skipped if it's a sched task.

I am unable to create a reliable test for this behavior, as there's no direct
way to have control over the scheduler tasks.

cc #12666, I discovered this when investigating that issue
doc: discuss try! in std::io