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

Various refactorings to clean up nll diagnostics #64416

Merged
merged 4 commits into from
Sep 17, 2019

Conversation

mark-i-m
Copy link
Member

  • Create ErrorReportingCtx and ErrorConstraintInfo, vasting reducing the
    number of arguments passed around everywhere in the error reporting code
  • Create RegionErrorNamingCtx, making a given lifetime have consistent
    numbering thoughout all error messages for that MIR def.
  • Make the error reporting code return the DiagnosticBuilder rather than
    directly buffer the Diagnostic. This makes it easier to modify the
    diagnostic later, e.g. to add suggestions.

r? @estebank

Split out from #58281

- Create ErrorReportingCtx and ErrorConstraintInfo, vasting reducing the
  number of arguments passed around everywhere in the error reporting code
- Create RegionErrorNamingCtx, making a given lifetime have consistent
  numbering thoughout all error messages for that MIR def.
- Make the error reporting code return the DiagnosticBuilder rather than
  directly buffer the Diagnostic. This makes it easier to modify the
  diagnostic later, e.g. to add suggestions.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 12, 2019
@rust-highfive
Copy link
Collaborator

The job mingw-check 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.
2019-09-12T22:05:30.4414447Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-12T22:05:30.4605984Z ##[command]git config gc.auto 0
2019-09-12T22:05:30.4685794Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-12T22:05:30.4762415Z ##[command]git config --get-all http.proxy
2019-09-12T22:05:30.4902419Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64416/merge:refs/remotes/pull/64416/merge
---
2019-09-12T22:15:05.6118839Z     Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-09-12T22:15:06.4068533Z error[E0432]: unresolved import `crate::borrow_check::nll::region_infer::error_reporting::outlives_suggestion`
2019-09-12T22:15:06.4068969Z   --> src/librustc_mir/borrow_check/nll/region_infer/mod.rs:14:36
2019-09-12T22:15:06.4069259Z    |
2019-09-12T22:15:06.4069577Z 14 |     region_infer::error_reporting::outlives_suggestion::OutlivesSuggestionBuilder,
2019-09-12T22:15:06.4070298Z    |                                    ^^^^^^^^^^^^^^^^^^^ could not find `outlives_suggestion` in `error_reporting`
2019-09-12T22:15:06.7763970Z error[E0425]: cannot find value `errors_buffer` in this scope
2019-09-12T22:15:06.7764570Z     --> src/librustc_mir/borrow_check/nll/region_infer/mod.rs:1497:19
2019-09-12T22:15:06.7765450Z      |
2019-09-12T22:15:06.7765450Z      |
2019-09-12T22:15:06.7766179Z 1497 |         db.buffer(errors_buffer);
2019-09-12T22:15:06.7766701Z 
2019-09-12T22:15:09.4752006Z     Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-09-12T22:15:11.1921556Z     Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
2019-09-12T22:15:11.9414770Z     Checking rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
---
2019-09-12T22:15:16.2336918Z == clock drift check ==
2019-09-12T22:15:16.2358406Z   local time: Thu Sep 12 22:15:16 UTC 2019
2019-09-12T22:15:16.5142957Z   network time: Thu, 12 Sep 2019 22:15:16 GMT
2019-09-12T22:15:16.5152159Z == end clock drift check ==
2019-09-12T22:15:17.6804657Z ##[error]Bash exited with code '1'.
2019-09-12T22:15:17.6838725Z ##[section]Starting: Checkout
2019-09-12T22:15:17.6840645Z ==============================================================================
2019-09-12T22:15:17.6840699Z Task         : Get sources
2019-09-12T22:15:17.6840748Z 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 @TimNN. (Feature Requests)

@mark-i-m mark-i-m marked this pull request as ready for review September 12, 2019 23:20
@mark-i-m
Copy link
Member Author

Hmm... still running the tests, but it seems there might not be any changes because there are no outlives suggestions that might force a region number to be assigned earlier.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 16, 2019

📌 Commit 2a774b1 has been approved by estebank

@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 Sep 16, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 16, 2019
Various refactorings to clean up nll diagnostics

- Create ErrorReportingCtx and ErrorConstraintInfo, vasting reducing the
  number of arguments passed around everywhere in the error reporting code
- Create RegionErrorNamingCtx, making a given lifetime have consistent
  numbering thoughout all error messages for that MIR def.
- Make the error reporting code return the DiagnosticBuilder rather than
  directly buffer the Diagnostic. This makes it easier to modify the
  diagnostic later, e.g. to add suggestions.

r? @estebank

Split out from rust-lang#58281
Centril added a commit to Centril/rust that referenced this pull request Sep 17, 2019
Various refactorings to clean up nll diagnostics

- Create ErrorReportingCtx and ErrorConstraintInfo, vasting reducing the
  number of arguments passed around everywhere in the error reporting code
- Create RegionErrorNamingCtx, making a given lifetime have consistent
  numbering thoughout all error messages for that MIR def.
- Make the error reporting code return the DiagnosticBuilder rather than
  directly buffer the Diagnostic. This makes it easier to modify the
  diagnostic later, e.g. to add suggestions.

r? @estebank

Split out from rust-lang#58281
bors added a commit that referenced this pull request Sep 17, 2019
Rollup of 6 pull requests

Successful merges:

 - #64085 (Tweak unsatisfied HRTB errors)
 - #64380 (Update bundled OpenSSL to 1.1.1d)
 - #64416 (Various refactorings to clean up nll diagnostics)
 - #64500 (Various `ObligationForest` improvements)
 - #64530 (Elide lifetimes in `Pin<&(mut) Self>`)
 - #64531 (Use shorthand syntax in the self parameter of methods of Pin)

Failed merges:

r? @ghost
@bors bors merged commit 2a774b1 into rust-lang:master Sep 17, 2019
@mark-i-m mark-i-m deleted the region-naming-ctx branch December 11, 2019 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants