rustc: Convert a fail! to a useful error message.
auto merge of #6990 : huonw/rust/const-eval, r=bstrie

This fail! caused ICEs, but was trivial to convert to a useful error message.
Merge branch 'each-fn-kill' of https://github.com/huonw/rust into each-fn-kill
iterator: work around method resolve bug (#5898)
auto merge of #6999 : thestinger/rust/each-fn-kill, r=thestinger
Add test for #6155
rustc::typeck: fix array out of bounds

Fixes #6155
pass correct flags to jemalloc for cross-compiling
Mention `for` in the section on loops

The "4.3 Loops" section only describes `while` and `loop`. We then see `for`
used in a code sample at the end of the "13. Vectors and strings" section,
but it's explained for the first time only in the next section --
"14. Closures".

It is worth mentioning it in "4.3 Loops".
std: Change str::from_bytes to raise a condition on invalid input

As per #4765
auto merge of #7001 : alco/rust/tutorial-for-loop, r=bstrie

The "4.3 Loops" section only describes `while` and `loop`. We then see `for`
used in a code sample at the end of the "13. Vectors and strings" section,
but it's explained for the first time only in the next section --
"14. Closures".

It is worth mentioning it in "4.3 Loops".

---

Feel free to reword it and commit yourself if you don't like my wording.
A reminder that a block is a single expr in closures

This is something that's only been briefly mentioned in the beginning of
the tutorial and all of the closure examples within this subsection
include only one expression between { and }.
Lexer: Fix offset handling in get_str_from()

As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
add the Iterator trait to the prelude
testsuite: Add test cases that pass
auto merge of #6695 : catamorphism/rust/moretestcases, r=catamorphism
auto merge of #6920 : catamorphism/rust/issue-4765, r=bstrie

r? anybody As per #4765
auto merge of #7000 : Blei/rust/fix-6155, r=catamorphism
auto merge of #7003 : alco/rust/tutorial-block-expr, r=bstrie

This is something that's only been briefly mentioned in the beginning of
the tutorial and all of the closure examples within this subsection
include only one expression between { and }.
auto merge of #7005 : dotdash/rust/fix_get_str_from, r=bstrie

As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.