Add lru_cache to libextra
Disable priv in std::comm::Port, etc

It's useful to allow users to get at the internal std::rc::comm::Port,
and other such fields, since they implement important traits like
Select.
don't create intermediate string while creating json (rustdoc)
Make trait lifetime parameters early bound in static fn type.  This is related
to #5121.

Fixes #10391.
Update LLVM and jettison jit support

LLVM's JIT has been updated numerous times, and we haven't been tracking it at
all. The existing LLVM glue code no longer compiles, and the JIT isn't used for
anything currently.

This also rebases out the FixedStackSegment support which we have added to LLVM.
None of this is still in use by the compiler, and there's no need to keep this
functionality around inside of LLVM.

This is needed to unblock #10708 (where we're tripping an LLVM assertion).
Solve some nasty deschedulinging races with a lock

Right now, as pointed out in #8132, it is very easy to introduce a subtle race
in the runtime. I believe that this is the cause of the current flakiness on the
bots.

I have taken the last idea mentioned in that issue which is to use a lock around
descheduling and context switching in order to solve this race.

Closes #8132
Forbid keywords as lifetime parameters names.
auto merge of #10211 : ktt3ja/rust/add-lrucache, r=brson

There's an open issue ([Issue #4988](https://github.com/mozilla/rust/issues/4988?source=cc)) for adding an LRU Cache to the standard library. I'm new to this so I hope I didn't miss anything I'm supposed to do.
auto merge of #10817 : alexcrichton/rust/sched-fix, r=brson

Right now, as pointed out in #8132, it is very easy to introduce a subtle race
in the runtime. I believe that this is the cause of the current flakiness on the
bots.

I have taken the last idea mentioned in that issue which is to use a lock around
descheduling and context switching in order to solve this race.

Closes #8132
auto merge of #10562 : ongardie/rust/master, r=brson

It's useful to allow users to get at the internal std::rc::comm::Port,
and other such fields, since they implement important traits like
Select.

See [rust-dev] "select on std::comm::Port and different types" at https://mail.mozilla.org/pipermail/rust-dev/2013-November/006735.html for background.
Fix test for #10391 to have pub main
auto merge of #10506 : nikomatsakis/rust/issue-10391-ICE-with-lifetimes, r=pnkfelix

Make trait lifetime parameters early bound in static fn type. Reasoning for this change is (hopefully) explained well enough in the comment, so I'll not duplicate it here. Fixes #10391.

r? @pnkfelix
Remove unused upcalls

The main one removed is rust_upcall_reset_stack_limit (continuation of #10156),
and this also removes the upcall_trace function. The was hidden behind a
`-Z trace` flag, but if you attempt to use this now you'll get a linker error
because there is no implementation of the 'upcall_trace' function. Due to this
no longer working, I decided to remove it entirely from the compiler (I'm also a
little unsure on what it did in the first place).
auto merge of #10675 : LeoTestard/rust/lifetimes-no-keywords, r=brson

Fixes #10565.

`'self` is still allowed for the moment, as it is used everywhere in the codebase. And I'm not sure if it still has a special meaning currently or not.
auto merge of #10721 : osa1/rust/intermediatestr, r=brson

as recommended by @huonw on this PR https://github.com/mozilla/rust/pull/10711 , I removed intermediate step that generates a string instead of directly writing to Writer without generating intermediate string.
Use a macro in lang_items to remove duplication.

This should make maintenance of lang items simpler and also reduces the
line count by about 201 lines.
auto merge of #10758 : alexcrichton/rust/upgrade-llvm, r=alexcrichton

This upgrades LLVM in order to make progress on #10708, and it's also been awhile since we last upgraded!

The contentious point of this upgrade is that all JIT support has been removed because LLVM is changing it and we're not keeping up with it.
Check crate root for docs in missing_doc lint.

Because the root module isn't actually an item, we need to do some hackish
handling of it.

Closes #10656.
auto merge of #10665 : cmr/rust/doc_lint, r=alexcrichton

Because the root module isn't actually an item, we need to do some hackish
handling of it.

Closes #10656.
auto merge of #10832 : chris-morgan/rust/let's-lop-lang-item-line-count, r=alexcrichton

This should make maintenance of lang items simpler and also reduces the
line count by about 201 lines.