This brings across changes made to the term library to libterm. This
includes removing instances or unwrap, fixing format string handling, and
removing a TODO.
This fix does not bring all changes across, as term now relies on cargo
deps that cannot be brought into the rust build at this stage, but has
attempted as best to cross port changes not relying on this. This notably
limits extra functionality since implemented int he Terminal trait in
Term.
This is in partly in response to rust issue #29992.
I think this fixes#30137. I basically just repeated some details that were scattered around other places in this document, and emphasized that you probably don't want an `extern crate` or `mod` statement to end up inside a function.
The documentation shows this:
[dependencies]
rand="0.3.0"
and says it allows any version compatible with 0.3.0, but then it says, "If we wanted to use only 0.3.0 exactly, we could use `=0.3.0`." That is very easy to misunderstand, so hopefully this PR will help others not to be as confused as me. :-)
I think this fixes#30137. I basically just repeated some details that were scattered around other places in this document, and emphasized that you probably don't want an `extern crate` or `mod` statement to end up inside a function.
The Rust build scripts do work if the source directory contains spaces. I tried to make it work with spaces. I managed to get the Rust's and LLVM's configure scripts to work with spaces in the path, but I could not figure out how to get the Rust makefiles working.
So for now, this PR updates Rust's `configure` to abort if the source path contains spaces. I also added a note about spaces in the source path to the README.
I think this should close#18477 for now.
This PR allows the constant evaluation of index operations on constant arrays and repeat expressions. This allows index expressions to appear in the expression path of the length expression of a repeat expression or an array type.
An example is
```rust
const ARR: [usize; 5] = [1, 2, 3, 4, 5];
const ARR2: [usize; ARR[1]] = [42, 99];
```
In most other locations llvm's const evaluator figures it out already. This is not specific to index expressions and could be remedied in the future.
* `const`: Add reference to raw pointers
* Change `expr!(...)` etc. examples to use `ident` instead.
*Technically*, it should be `pat`, but that's not how it works in
practice.
* `|`: add reference to closure syntax.
* Closure syntax entry.
* Indexing and slicing entries.
* Add history of obsolete and deprecated syntax.
r? @steveklabnik
This PR adds some safety checks to interning things in `ty::ctxt`. Accidentally re-interning an `AdtDef` has bitten me in the behind just last week (it messes up things in very subtle way only showing up later as an LLVM assertion).
Initially I had also added a check to `ty::ctxt::node_type_insert()` -- but there it seems to be expected that the same table slot is written to multiple times.
Roll-up candidate.