I ran across a comma splice.
I didn't set the "note:" off inside parenthesis. I looked around in other places and saw it both ways, but without surrounding parenthesis seemed to be the more common convention followed elsewhere in the docs. Let me know if you have an overriding preference about that and I'll change it.
r? @steveklabnik
This syncs the _Crates and Modules_ chapter of the book with current output:
* the runs are supposed to be in the project’s directory,
* `rustc` has slightly different error messages (and things like macro line:col numbers),
* Cargo now compiles things into `target/debug`.
Function params which outlive everything in the body (incl
temporaries). Thus if we assign them their own `CodeExtent`, the
region inference can properly show that it is sound to have
temporaries with destructors that reference the parameters (because
such temporaries will be dropped before the parameters are).
This allows us to address issue 23338 in a clean way.
As a drive-by, fix a mistake in the tyencode for
`CodeExtent::BlockRemainder`.
Until I can figure out the correct way to configure jemalloc for Bitrig, this patch will correctly disable it. All other build targets remain unchanged.
MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.
Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).
Fixes#23138.
Fixes#24030
Of the four code samples with modules in TRPL:
- 2 use `mod test`
- 2 use `mod tests`
We should be consistent here, but which is right? The stdlib is split:
$ grep -r 'mod tests {' src/lib* | wc -l
63
$ grep -r 'mod test {' src/lib* | wc -l
58
Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.
Right now comparing a `&String` (or a `&Cow`) to a `&str` requires redundant borrowing of the latter. Implementing `PartialEq<str>` tries to avoid this limitation.
```rust
struct Foo (String);
fn main () {
let s = Foo("foo".to_string());
match s {
Foo(ref x) if x == &"foo" => println!("foo!"),
// avoid this -----^
_ => {}
}
}
```
I was hoping that #23521 would solve this but it didn't work out.
Fixes#22757Fixes#22972Fixes#23044Fixes#23151Fixes#23597Fixes#23656Fixes#23929
It also fixes some other corner cases in range patterns, like incorrect spans or not accepting global paths after `...`.
It passes `make check` but needs some additional tests (then it will fix#22546 as well), I'll write them today or tomorrow.
MacOS X does not ship with Java installed by default. Instead it
includes binary stubs that upon execution pop up a message suggesting
the installation of the JDK.
Since `javac` is only used when `antlr4` is available, it is possible
to work around the popup by only probing for `javac` if `antlr4` has
been successfully detected (in which case the JDK is probably already
installed on the system).
Fixes#23138.