core: add vec::bsearch.
core: replace unicode match exprs with bsearch in const arrays, minor perf win.
Fix an ICE when dereferencing types which cannot be dereferenced
Fix an ICE when dereferencing types which cannot be dereferenced
syntax: de-mode and prepare for de-modeing rustc
rustc: de-mode + fallout from libsyntax changes
Assorted fixes from de-modeing rustc/syntax (rusti, rustdoc, fuzzer, rustpkg)
core: clean up tests (mostly unused unsafe blocks)
std: clean up tests (mostly unused unsafe blocks)
auto merge of #5945 : graydon/rust/fix-unicode-tables, r=pcwalton

This switches the unicode functions in core to use static character-range tables and a binary search helper rather than open-coded switch statements. It adds about 50k of read only data to the libcore binary but cuts out a similar amount of compiled IR. Would have done it this way in the first place but we didn't have structured statics for a long time.
auto merge of #5963 : alexcrichton/rust/fix-ice, r=pcwalton

I ran across this when working on some other changes, and it looked like it wasn't too hard to "fix". I'm not very familiar with this code, but it looks like if an error was already generated there's no need to generate and ICE as well when parts of the program can just be ignored for more incorrectness.
auto merge of #5965 : alexcrichton/rust/issue-4364, r=pcwalton

This closes #4364. I came into rust after modes had begun to be phased out, so I'm not exactly sure what they all did. My strategy was basically to turn on the compilation warnings and then when everything compiles and passes all the tests it's all good.

In most cases, I just dropped the mode, but in others I converted things to use `&` pointers when otherwise a move would happen.

This depends on #5963. When running the tests, everything passed except for a few compile-fail tests. These tests leaked memory, causing the task to abort differently. By suppressing the ICE from #5963, no leaks happen and the tests all pass. I would have looked into where the leaks were coming from, but I wasn't sure where or how to debug them (I found `RUSTRT_TRACK_ALLOCATIONS`, but it wasn't all that useful).
libcore: add a ScanIterator, a generalisation of MapIterator to have internal state.
libcore: add methods for consuming iterators: foldl and to_vec.
libcore: convert iterator tests to use to_vec instead of iterating.

Unfortunately this requires dereferencing each element due to how the vec
iterators work. Also, add an explicit test for `advance` since it was no
longer being tested itself.