Skip to content

Rollup of 7 pull requests - #64181

Closed
Centril wants to merge 43 commits into
rust-lang:masterfrom
Centril:rollup-77yz57x
Closed

Rollup of 7 pull requests#64181
Centril wants to merge 43 commits into
rust-lang:masterfrom
Centril:rollup-77yz57x

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

mati865and others added 30 commits August 27, 2019 10:46
Rustbuild usually writes the LLVM submodule commit in a stamp file, so
we can avoid rebuilding it unnecessarily. However, for builds from a
source tarball (non-git), we were assuming a rebuild is always needed.
This can cause a lot of extra work if any environment like `CFLAGS`
changed between steps like build and install, which are often separate
in distro builds.
Now we also write an empty stamp file if the git commit is unknown, and
its presence is trusted to indicate that no rebuild is needed. An info
message reports that this is happening, along with the stamp file path
that can be deleted to force a rebuild anyway.
Fuse `parse_top_pat` and `parse_top_pat_unpack` into just `parse_top_pat`.
Introduces a temporary hack to keep `Vec<P<Pat>>` in
`hir::Arm.pats` so that we keep the changes more incremental.
Centriland others added 13 commits September 5, 2019 08:33
Upgrade rand to 0.7
Also upgrades `getrandom` to avoid bug encountered by rust-lang#61393 which bumps libc to `0.2.62`.
`wasi` crate was going to be added by rust-lang#63676 anyway.
…xcrichton
Remove no-prefer-dynamic from valgrind tests
This seems to be working locally.
Resolvesrust-lang#31968
…umeGomez
Improve searching in rustdoc and add tests
👋 I have made searching in rustdoc more intuitive, added a couple more tests and made a little shell script to aid testing. Closesrust-lang#63005.
It took me quite a while to figure out how to run the tests for rustdoc (instead of running tests for other crates with rustdoc); the only pointer I found was [hidden in the rustc book](https://rust-lang.github.io/rustc-guide/rustdoc.html#cheat-sheet). Maybe this could be better documented? I shall be delighted to help if it is desirable.
Do not complain about unconstrained params when Self is Ty Error
Fixrust-lang#36836.
…ochenkov
or-patterns: Uniformly use `PatKind::Or` in AST & Fix/Cleanup resolve
Following up on work in rust-lang#63693 and rust-lang#61708, in this PR we:
- Uniformly use `PatKind::Or(...)` in AST:
- Change `ast::Arm.pats: Vec<P<Pat>>` => `ast::Arm.pat: P<Pat>`
- Change `ast::ExprKind::Let.0: Vec<P<Pat>>` => `ast::ExprKind::Let.0: P<Pat>`
- Adjust `librustc_resolve/late.rs` to correctly handle or-patterns at any level of nesting as a result.
In particular, the already-bound check which rejects e.g. `let (a, a);` now accounts for or-patterns. The consistency checking (ensures no missing bindings and binding mode consistency) also now accounts for or-patterns. In the process, a bug was found in the current compiler which allowed:
```rust
enum E<T> { A(T, T), B(T) }
use E::*;
fn foo() {
match A(0, 1) {
B(mut a) | A(mut a, mut a) => {}
}
}
```
The new algorithms took a few iterations to get right. I tried several clever schemes but ultimately a version based on a stack of hashsets and recording product/sum contexts was chosen since it is more clearly correct.
- Clean up `librustc_resolve/late.rs` by, among other things, using a new `with_rib` function to better ensure stack dicipline.
- Do not push the change in AST to HIR for now to avoid doing too much in this PR. To cope with this, we introduce a temporary hack in `rustc::hir::lowering` (clearly marked in the diff).
cc rust-lang#54883
cc @dlrobertson@matthewjasper
r? @petrochenkov
Assume non-git LLVM is fresh if the stamp file exists
Rustbuild usually writes the LLVM submodule commit in a stamp file, so
we can avoid rebuilding it unnecessarily. However, for builds from a
source tarball (non-git), we were assuming a rebuild is always needed.
This can cause a lot of extra work if any environment like `CFLAGS`
changed between steps like build and install, which are often separate
in distro builds.
Now we also write an empty stamp file if the git commit is unknown, and
its presence is trusted to indicate that no rebuild is needed. An info
message reports that this is happening, along with the stamp file path
that can be deleted to force a rebuild anyway.
Fixesrust-lang#61206.
…-should-be-div, r=Mark-Simulacrum
Fix invalid span generation when it should be div
Fixesrust-lang#64146.
It changes basically nothing in the display... Can be checked with:
```rust
pub enum X {
/// Some doc?
///
/// with lines!
Foo {
/// a
///
/// b
x: u32,
/// Doc!
///
/// ```
/// yolo
/// ```
y: String,
},
/// Doc!
///
/// ```
/// yolo
/// ```
Bar(String),
}
```
r? @Mark-Simulacrum
@CentrilCentril closed this Sep 5, 2019
@Centril
Centril deleted the rollup-77yz57x branch September 5, 2019 16:34
@CentrilCentril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@Centril@mati865@Mark-Simulacrum@estebank@ayuusweetfish@cuviper@GuillaumeGomez