Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #69884

Closed
wants to merge 59 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 10, 2020

Successful merges:

Failed merges:

r? @ghost

matthewjasper and others added 30 commits February 29, 2020 12:28
For some reason the absolute paths were formatted differently on the
armhf-gnu target.

    thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
      left: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"./rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"./rust/rt.rs\", line: 400 },\n]"`,
     right: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"/rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"/rust/rt.rs\", line: 400 },\n]"`', src/libstd/backtrace.rs:486:5
Centril added 7 commits March 10, 2020 08:55
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
…, r=nikomatsakis

Use TypeRelating for instantiating query responses

`eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.

closes rust-lang#69490
Improve expression & attribute parsing

This PR includes misc improvements to expression and attribute parsing.

1. Some code simplifications
2. Better recovery for various block forms, e.g. `loop statements }` (missing `{` after `loop`). (See e.g., `block-no-opening-brace.rs` among others for examples.)
3. Added recovery for e.g., `unsafe $b` where `$b` refers to a `block` macro fragment. (See `bad-interpolated-block.rs` for examples.)
4. ^--- These are done so that code sharing in block parsing is increased.
5. Added recovery for e.g., `'label: loop { ... }` (See `labeled-no-colon-expr.rs`.)
6. Added recovery for e.g., `&'lifetime expr` (See `regions-out-of-scope-slice.rs`.)
7. Added recovery for e.g., `fn foo() = expr;` (See `fn-body-eq-expr-semi.rs`.)
8. Simplified attribute parsing code & slightly improved diagnostics.
9. Added recovery for e.g., `Box<('a) + Trait>`.
10. Added recovery for e.g, `if true #[attr] {} else #[attr] {} else #[attr] if true {}`.

r? @estebank
…andry

Use smaller discriminants for generators

Closes rust-lang#69815

I'm not yet sure about the runtime performance impact of this, so I'll try running this on some benchmarks (if I can find any). (Update: No impact on the benchmarks I've measured on)

* [x] Add test with a generator that has exactly 256 total states
* [x] Add test with a generator that has more than 256 states so that it needs to use a u16 discriminant
* [x] Add tests for the size of `Option<[generator]>`
* [x] Add tests for the `discriminant_value` intrinsic in all cases
…ov,eddyb

Expansion-driven outline module parsing

After this PR, the parser will not do any conditional compilation or loading of external module files when `mod foo;` is encountered. Instead, the parser only leaves `mod foo;` in place in the AST, with no items filled in. Expansion later kicks in and will load the actual files and do the parsing. This entails that the following is now valid:

```rust
#[cfg(FALSE)]
mod foo {
    mod bar {
        mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
    }
}
```

Fixes rust-lang#64197.

r? @petrochenkov
@Centril Centril added the rollup A PR which is a rollup label Mar 10, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Mar 10, 2020

📌 Commit 5d10555 has been approved by Centril

@bors
Copy link
Contributor

bors commented Mar 10, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 10, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors p=1001

@bors
Copy link
Contributor

bors commented Mar 10, 2020

⌛ Testing commit 5d10555 with merge be71d15e4a0dc059b9b595e7a7b54a5d938a1766...

@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Mar 10, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 10, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 10, 2020

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 10, 2020
@bors
Copy link
Contributor

bors commented Mar 10, 2020

⌛ Testing commit 5d10555 with merge 85caa3e...

bors added a commit that referenced this pull request Mar 10, 2020
Rollup of 6 pull requests

Successful merges:

 - #69122 (Backtrace Debug tweaks)
 - #69591 (Use TypeRelating for instantiating query responses)
 - #69760 (Improve expression & attribute parsing)
 - #69837 (Use smaller discriminants for generators)
 - #69838 (Expansion-driven outline module parsing)
 - #69859 (fix #62456)

Failed merges:

r? @ghost
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-11T00:12:13.0591612Z 
2020-03-11T00:12:13.0592105Z failures:
2020-03-11T00:12:13.0592268Z 
2020-03-11T00:12:13.0593312Z ---- fix::fix_with_common stdout ----
2020-03-11T00:12:13.0594112Z running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo fix --edition --allow-no-vcs`
2020-03-11T00:12:13.0602858Z thread 'fix::fix_with_common' panicked at 'assertion failed: `(left == right)`
2020-03-11T00:12:13.0603229Z   left: `"pub fn try() {}"`,
2020-03-11T00:12:13.0603889Z  right: `"pub fn r#try() {}"`', src/tools/cargo/tests/testsuite/fix.rs:1229:5
2020-03-11T00:12:13.0604495Z 
2020-03-11T00:12:13.0604589Z 
2020-03-11T00:12:13.0604738Z failures:
2020-03-11T00:12:13.0604911Z     fix::fix_with_common
---
2020-03-11T00:12:13.0669767Z 
2020-03-11T00:12:13.0669865Z 
2020-03-11T00:12:13.0678429Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/tools/cargo src/tools/cargotest
2020-03-11T00:12:13.0679306Z Build completed unsuccessfully in 2:00:11
2020-03-11T00:12:13.0755267Z Makefile:50: recipe for target 'check-aux' failed
2020-03-11T00:12:13.0756854Z make: *** [check-aux] Error 1
2020-03-11T00:12:13.0776180Z   local time: Wed Mar 11 00:12:13 UTC 2020
2020-03-11T00:12:13.3691959Z   network time: Wed, 11 Mar 2020 00:12:13 GMT
2020-03-11T00:12:13.3692293Z == end clock drift check ==
2020-03-11T00:12:16.1109048Z 
2020-03-11T00:12:16.1109048Z 
2020-03-11T00:12:16.1222530Z ##[error]Bash exited with code '2'.
2020-03-11T00:12:16.1308497Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-03-11T00:12:16.1327243Z ==============================================================================
2020-03-11T00:12:16.1327714Z Task         : Get sources
2020-03-11T00:12:16.1328171Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Mar 11, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 11, 2020
@Centril Centril closed this Mar 11, 2020
@Centril Centril deleted the rollup-ecbbb1l branch March 11, 2020 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: index out of bounds with const generics
7 participants