rustc: Remove 'morestack_addr' intrinsic. Unused
Set the LD_LIBRARY_PATH when running tests

This way when you disable rpaths you can still run `make check`
extra::json: remove the use of `unsafe` char transmutes.

Avoid using -1 as a char sentinel, when Option<char> is the perfect
thing.
syntax: convert the lexer to use Option<char> over transmute(-1).

The transmute was unsound.

There are many instances of .unwrap_or('\x00') for "ignoring" EOF which
either do not make the situation worse than it was (well, actually make
it better, since it's easy to grep for places that don't handle EOF) or
can never ever be read.

Fixes #8971.
rustc: put range asserts on `char` loads.

A `char` is a Unicode codepoint, and so ranges from 0--0x10FFFF (with
the surrogate gaps): we may as well inform LLVM of this.
rustc: load bools as unsigned numbers.

Apparently loading them signed will break if/when they become i1.
Added missing export of CowArc
auto merge of #12099 : alexcrichton/rust/rpath-tests, r=thestinger

This way when you disable rpaths you can still run `make check`
Remove redundant Ord implementation for Version.

I've forgot why we keep them, so let me know if you know their reason
for existing.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Fix unused import warnings.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Remove an unused variable in a test of std::c_str.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Remove unnecessary parentheses.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Tweak from_utf8_lossy to return a new MaybeOwned enum

MaybeOwned allows from_utf8_lossy to avoid allocation if there are no
invalid bytes in the input.
Implement BytesContainer for MaybeOwned
Delete send_str, rewrite clients on top of MaybeOwned<'static>

Declare a `type SendStr = MaybeOwned<'static>` to ease readibility of
types that needed the old SendStr behavior.

Implement all the traits for MaybeOwned that SendStr used to implement.
Rewrite path::Display to reduce unnecessary allocation
auto merge of #12086 : huonw/rust/safe-json, r=kballard

The lexer and json were using `transmute(-1): char` as a sentinel value for EOF, which is invalid since `char` is strictly a unicode codepoint.

Fixing this allows for range asserts on chars since they always lie between 0 and 0x10FFFF.
auto merge of #12096 : brson/rust/morestack-addr, r=thestinger
auto merge of #12101 : csherratt/rust/master, r=alexcrichton

CowArc was crated before libsync and the merge request did not contain the required export change.
auto merge of #12098 : kballard/rust/from_utf8_lossy_tweak, r=huonw

MaybeOwned allows from_utf8_lossy to avoid allocation if there are no
invalid bytes in the input.

Before:
```
test str::bench::from_utf8_lossy_100_ascii                      ... bench:       183 ns/iter (+/- 5)
test str::bench::from_utf8_lossy_100_invalid                    ... bench:       341 ns/iter (+/- 15)
test str::bench::from_utf8_lossy_100_multibyte                  ... bench:       227 ns/iter (+/- 13)
test str::bench::from_utf8_lossy_invalid                        ... bench:       102 ns/iter (+/- 4)
test str::bench::is_utf8_100_ascii                              ... bench:         2 ns/iter (+/- 0)
test str::bench::is_utf8_100_multibyte                          ... bench:         2 ns/iter (+/- 0)
```

Now:
```
test str::bench::from_utf8_lossy_100_ascii                      ... bench:        96 ns/iter (+/- 4)
test str::bench::from_utf8_lossy_100_invalid                    ... bench:       318 ns/iter (+/- 10)
test str::bench::from_utf8_lossy_100_multibyte                  ... bench:       105 ns/iter (+/- 2)
test str::bench::from_utf8_lossy_invalid                        ... bench:       105 ns/iter (+/- 2)
test str::bench::is_utf8_100_ascii                              ... bench:         2 ns/iter (+/- 0)
test str::bench::is_utf8_100_multibyte                          ... bench:         2 ns/iter (+/- 0)
```