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

Refactorings to borrowck region diagnostic reporting #67241

Merged
merged 1 commit into from
Dec 24, 2019

Conversation

mark-i-m
Copy link
Member

@mark-i-m mark-i-m commented Dec 11, 2019

This PR is a followup to #66886 and #67404

EDIT: updated

In this PR: Clean up how errors are collected from NLL: introduce borrow_check::diagnostics::RegionErrors to collect errors. This is later passed to MirBorrowckCtx::report_region_errors after the MirBorrowckCtx is created. This will allow us to refactor away some of the extra context structs floating around (but we don't do it in this PR). borrow_check::region_infer is now mostly free of diagnostic generating code. The signatures of most of the functions in region_infer lose somewhere between 4 and 7 arguments :)

Left for future (feedback appreciated):

  • Merge ErrorRegionCtx with MirBorrowckCtx, as suggested by @matthewjasper in Remove the borrow check::nll submodule #66886 (comment)
  • Maybe move the contents of borrow_check::nll into borrow_check and remove the nll submodule altogether.
  • Find a way to make borrow_check::diagnostics::region_errors less of a strange appendage to RegionInferenceContext. I'm not really sure how to do this yet. Ideas welcome.

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 11, 2019
@mark-i-m
Copy link
Member Author

@rustbot modify labels: +S-blocked -S-waiting-on-review

Blocked on #66886 merging (which should happen soon)

cc @eddyb @matthewjasper

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 11, 2019
@mark-i-m mark-i-m changed the title Refactorings to borrowck Refactorings to borrowck region diagnostic reporting Dec 11, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-11T22:52:12.4888401Z ========================== Starting Command Output ===========================
2019-12-11T22:52:12.4892514Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/be45803e-018a-4843-ac2f-4545a75cbccf.sh
2019-12-11T22:52:12.4893053Z 
2019-12-11T22:52:12.4898046Z ##[section]Finishing: Disable git automatic line ending conversion
2019-12-11T22:52:12.4904826Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/67241/merge to s
2019-12-11T22:52:12.4906310Z Task         : Get sources
2019-12-11T22:52:12.4906341Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-12-11T22:52:12.4906414Z Version      : 1.0.0
2019-12-11T22:52:12.4906444Z Author       : Microsoft
---
2019-12-11T22:52:14.5439410Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-11T22:52:15.1893226Z ##[command]git config gc.auto 0
2019-12-11T22:52:15.1897776Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-11T22:52:15.1902257Z ##[command]git config --get-all http.proxy
2019-12-11T22:52:15.1911274Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-11T22:58:22.7539345Z    Compiling serde_json v1.0.40
2019-12-11T22:58:24.6367223Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-11T22:58:36.6133405Z     Finished release [optimized] target(s) in 1m 34s
2019-12-11T22:58:36.6245952Z tidy check
2019-12-11T22:58:37.6304437Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1566: TODO is deprecated; use FIXME
2019-12-11T22:58:37.6477665Z tidy error: /checkout/src/librustc_mir/borrow_check/region_infer/mod.rs:485: TODO is deprecated; use FIXME
2019-12-11T22:58:39.5841201Z Found 485 error codes
2019-12-11T22:58:39.5846696Z Found 0 error codes with no tests
2019-12-11T22:58:39.5846865Z Done!
2019-12-11T22:58:39.5846916Z some tidy checks failed
2019-12-11T22:58:39.5846916Z some tidy checks failed
2019-12-11T22:58:39.5846949Z 
2019-12-11T22:58:39.5846977Z 
2019-12-11T22:58:39.5847971Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-11T22:58:39.5848121Z 
2019-12-11T22:58:39.5848148Z 
2019-12-11T22:58:39.5852679Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-11T22:58:39.5852951Z Build completed unsuccessfully in 0:01:38
2019-12-11T22:58:39.5852951Z Build completed unsuccessfully in 0:01:38
2019-12-11T22:58:39.5902774Z == clock drift check ==
2019-12-11T22:58:39.5912670Z   local time: Wed Dec 11 22:58:39 UTC 2019
2019-12-11T22:58:39.8737427Z   network time: Wed, 11 Dec 2019 22:58:39 GMT
2019-12-11T22:58:39.8744167Z == end clock drift check ==
2019-12-11T22:58:41.1903851Z 
2019-12-11T22:58:41.2030046Z ##[error]Bash exited with code '1'.
2019-12-11T22:58:41.2044974Z ##[section]Finishing: Run build
2019-12-11T22:58:41.2061287Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/67241/merge to s
2019-12-11T22:58:41.2063545Z Task         : Get sources
2019-12-11T22:58:41.2063607Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-12-11T22:58:41.2063673Z Version      : 1.0.0
2019-12-11T22:58:41.2063714Z Author       : Microsoft
2019-12-11T22:58:41.2063714Z Author       : Microsoft
2019-12-11T22:58:41.2063778Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-12-11T22:58:41.2063828Z ==============================================================================
2019-12-11T22:58:41.7023368Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2019-12-11T22:58:41.7072498Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/67241/merge to s
2019-12-11T22:58:41.7197471Z Start cleaning up orphan processes.
2019-12-11T22:58:41.7357203Z Terminate orphan process: pid (3591) (python)
2019-12-11T22:58:41.7684046Z ##[section]Finishing: Finalize Job
2019-12-11T22:58:41.7745846Z ##[section]Finishing: Linux x86_64-gnu-llvm-7

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)

@bors
Copy link
Contributor

bors commented Dec 12, 2019

☔ The latest upstream changes (presumably #66650) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-12T03:37:05.6832011Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-12T03:37:05.6853936Z ##[command]git config gc.auto 0
2019-12-12T03:37:05.6862465Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-12T03:37:05.6867364Z ##[command]git config --get-all http.proxy
2019-12-12T03:37:05.6872999Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-12T03:43:02.0959951Z    Compiling serde_json v1.0.40
2019-12-12T03:43:03.8463074Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-12T03:43:14.8934959Z     Finished release [optimized] target(s) in 1m 27s
2019-12-12T03:43:14.9048803Z tidy check
2019-12-12T03:43:15.7932224Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1566: TODO is deprecated; use FIXME
2019-12-12T03:43:15.8098230Z tidy error: /checkout/src/librustc_mir/borrow_check/region_infer/mod.rs:485: TODO is deprecated; use FIXME
2019-12-12T03:43:17.5182110Z some tidy checks failed
2019-12-12T03:43:17.5182198Z Found 485 error codes
2019-12-12T03:43:17.5182289Z Found 0 error codes with no tests
2019-12-12T03:43:17.5182330Z Done!
2019-12-12T03:43:17.5182330Z Done!
2019-12-12T03:43:17.5185701Z 
2019-12-12T03:43:17.5186002Z 
2019-12-12T03:43:17.5186940Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-12T03:43:17.5187304Z 
2019-12-12T03:43:17.5187533Z 
2019-12-12T03:43:17.5192434Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-12T03:43:17.5192524Z Build completed unsuccessfully in 0:01:30
2019-12-12T03:43:17.5192524Z Build completed unsuccessfully in 0:01:30
2019-12-12T03:43:17.5245761Z == clock drift check ==
2019-12-12T03:43:17.5255116Z   local time: Thu Dec 12 03:43:17 UTC 2019
2019-12-12T03:43:17.8046591Z   network time: Thu, 12 Dec 2019 03:43:17 GMT
2019-12-12T03:43:17.8050230Z == end clock drift check ==
2019-12-12T03:43:19.7919913Z 
2019-12-12T03:43:19.8005357Z ##[error]Bash exited with code '1'.
2019-12-12T03:43:19.8038079Z ##[section]Starting: Checkout
2019-12-12T03:43:19.8040130Z ==============================================================================
2019-12-12T03:43:19.8040187Z Task         : Get sources
2019-12-12T03:43:19.8040249Z 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-12T18:55:21.6838740Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-12T18:55:22.6761514Z ##[command]git config gc.auto 0
2019-12-12T18:55:22.6766255Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-12T18:55:22.6769435Z ##[command]git config --get-all http.proxy
2019-12-12T18:55:22.6772100Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-12T19:01:13.7457246Z    Compiling serde_json v1.0.40
2019-12-12T19:01:15.6177252Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-12T19:01:26.7016792Z     Finished release [optimized] target(s) in 1m 29s
2019-12-12T19:01:26.7132531Z tidy check
2019-12-12T19:01:27.6541168Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1566: TODO is deprecated; use FIXME
2019-12-12T19:01:27.6712107Z tidy error: /checkout/src/librustc_mir/borrow_check/region_infer/mod.rs:485: TODO is deprecated; use FIXME
2019-12-12T19:01:29.5139704Z some tidy checks failed
2019-12-12T19:01:29.5140577Z Found 485 error codes
2019-12-12T19:01:29.5141020Z Found 0 error codes with no tests
2019-12-12T19:01:29.5141323Z Done!
2019-12-12T19:01:29.5141323Z Done!
2019-12-12T19:01:29.5144904Z 
2019-12-12T19:01:29.5145245Z 
2019-12-12T19:01:29.5146466Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-12T19:01:29.5147087Z 
2019-12-12T19:01:29.5147312Z 
2019-12-12T19:01:29.5154327Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-12T19:01:29.5154407Z Build completed unsuccessfully in 0:01:33
2019-12-12T19:01:29.5154407Z Build completed unsuccessfully in 0:01:33
2019-12-12T19:01:29.5213732Z == clock drift check ==
2019-12-12T19:01:29.5223739Z   local time: Thu Dec 12 19:01:29 UTC 2019
2019-12-12T19:01:30.3167237Z   network time: Thu, 12 Dec 2019 19:01:29 GMT
2019-12-12T19:01:30.3167862Z == end clock drift check ==
2019-12-12T19:01:30.9172804Z 
2019-12-12T19:01:30.9259162Z ##[error]Bash exited with code '1'.
2019-12-12T19:01:30.9290340Z ##[section]Starting: Checkout
2019-12-12T19:01:30.9292716Z ==============================================================================
2019-12-12T19:01:30.9292794Z Task         : Get sources
2019-12-12T19:01:30.9292847Z 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
Copy link
Member Author

Ok, so this is looking like it will be one of those PRs that later get split up into smaller PRs...

I'm going to leave some notes to self here:

  • I need to look through all the places where errors_buffer.buffer(diag) is called. These represent all of the types of errors that can occur.
  • I would like to create an enum with a variant for each possible type of error and the needed information for generating an error diagnostic. The new RegionErrors type collects these as errors are encountered.
  • After borrow checking, we now have a big list of errors of various times with their corresponding metadata. We can use this list to generate diagnostics after the MirBorrowckCtx is created.
  • I'm moving all of the error-handling code out of region_infer into region_errors, where they belong... This means that the logic left in region_infer will be purely the region inference logic.

@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-12-13T00:11:23.3768783Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-13T00:11:23.4033458Z ##[command]git config gc.auto 0
2019-12-13T00:11:23.4121234Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-13T00:11:23.4191153Z ##[command]git config --get-all http.proxy
2019-12-13T00:11:23.4341400Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-13T00:19:12.2650662Z     Checking rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-12-13T00:19:14.0010951Z     Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-12-13T00:19:15.4923886Z     Checking rustc_traits v0.0.0 (/checkout/src/librustc_traits)
2019-12-13T00:19:16.5840645Z     Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-12-13T00:19:17.5597291Z error[E0433]: failed to resolve: use of undeclared type or module `ClosureOutlivesSubject`
2019-12-13T00:19:17.5598063Z     |
2019-12-13T00:19:17.5598063Z     |
2019-12-13T00:19:17.5603116Z 165 |                         subject: ClosureOutlivesSubject::Region(fr_minus),
2019-12-13T00:19:17.5603876Z     |                                  ^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `ClosureOutlivesSubject`
2019-12-13T00:19:17.5603940Z 
2019-12-13T00:19:17.9217644Z error[E0412]: cannot find type `ClosureOutlivesRequirement` in this scope
2019-12-13T00:19:17.9218358Z     |
2019-12-13T00:19:17.9218358Z     |
2019-12-13T00:19:17.9219275Z 127 |         propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
2019-12-13T00:19:17.9220066Z     |
2019-12-13T00:19:17.9220345Z help: possible candidate is found in another module, you can import it into scope
2019-12-13T00:19:17.9220563Z     |
2019-12-13T00:19:17.9220563Z     |
2019-12-13T00:19:17.9220881Z 3   | use rustc::mir::ClosureOutlivesRequirement;
2019-12-13T00:19:17.9221141Z 
2019-12-13T00:19:17.9277894Z error[E0412]: cannot find type `ErrorReported` in this scope
2019-12-13T00:19:17.9278252Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:131:17
2019-12-13T00:19:17.9278518Z     |
2019-12-13T00:19:17.9278518Z     |
2019-12-13T00:19:17.9278844Z 131 |     ) -> Option<ErrorReported> {
2019-12-13T00:19:17.9279426Z     |
2019-12-13T00:19:17.9279746Z help: possible candidates are found in other modules, you can import them into scope
2019-12-13T00:19:17.9279968Z     |
2019-12-13T00:19:17.9279968Z     |
2019-12-13T00:19:17.9280254Z 3   | use rustc::util::common::ErrorReported;
2019-12-13T00:19:17.9280790Z 3   | use rustc_errors::ErrorReported;
2019-12-13T00:19:17.9281009Z     |
2019-12-13T00:19:17.9281063Z 
2019-12-13T00:19:17.9281063Z 
2019-12-13T00:19:17.9369562Z error[E0422]: cannot find struct, variant or union type `ClosureOutlivesRequirement` in this scope
2019-12-13T00:19:17.9370247Z     |
2019-12-13T00:19:17.9370247Z     |
2019-12-13T00:19:17.9370624Z 164 |                     propagated_outlives_requirements.push(ClosureOutlivesRequirement {
2019-12-13T00:19:17.9371360Z     |
2019-12-13T00:19:17.9371679Z help: possible candidate is found in another module, you can import it into scope
2019-12-13T00:19:17.9371964Z     |
2019-12-13T00:19:17.9371964Z     |
2019-12-13T00:19:17.9372288Z 3   | use rustc::mir::ClosureOutlivesRequirement;
2019-12-13T00:19:17.9372586Z 
2019-12-13T00:19:17.9372888Z error[E0425]: cannot find value `ErrorReported` in this scope
2019-12-13T00:19:17.9373206Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:196:14
2019-12-13T00:19:17.9373466Z     |
2019-12-13T00:19:17.9373466Z     |
2019-12-13T00:19:17.9373763Z 196 |         Some(ErrorReported)
2019-12-13T00:19:17.9374117Z     |              ^^^^^^^^^^^^^ not found in this scope
2019-12-13T00:19:17.9374618Z     |
2019-12-13T00:19:17.9375174Z help: possible candidates are found in other modules, you can import them into scope
2019-12-13T00:19:17.9375544Z     |
2019-12-13T00:19:17.9375836Z 3   | use rustc::util::common::ErrorReported;
2019-12-13T00:19:17.9376295Z 3   | use rustc_errors::ErrorReported;
2019-12-13T00:19:17.9376519Z     |
2019-12-13T00:19:17.9376550Z 
2019-12-13T00:19:18.2333190Z error: unused import: `Diagnostic`
2019-12-13T00:19:18.2333190Z error: unused import: `Diagnostic`
2019-12-13T00:19:18.2333559Z   --> src/librustc_mir/borrow_check/region_infer/mod.rs:21:20
2019-12-13T00:19:18.2333818Z    |
2019-12-13T00:19:18.2334121Z 21 | use rustc_errors::{Diagnostic, DiagnosticBuilder};
2019-12-13T00:19:18.2334616Z    |
2019-12-13T00:19:18.2335020Z    = note: `-D unused-imports` implied by `-D warnings`
2019-12-13T00:19:18.2335058Z 
2019-12-13T00:19:20.6131297Z error[E0308]: mismatched types
2019-12-13T00:19:20.6131297Z error[E0308]: mismatched types
2019-12-13T00:19:20.6131702Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:194:19
2019-12-13T00:19:20.6132037Z     |
2019-12-13T00:19:20.6132366Z 194 |         db.buffer(errors_buffer);
2019-12-13T00:19:20.6132860Z     |                   ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:20.6133167Z     |
2019-12-13T00:19:20.6133527Z     = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:20.6133873Z                found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:20.6179586Z error[E0624]: method `universal_upper_bound` is private
2019-12-13T00:19:20.6179952Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:216:36
2019-12-13T00:19:20.6180192Z     |
2019-12-13T00:19:20.6180192Z     |
2019-12-13T00:19:20.6180495Z 216 |             let upper_bound = self.universal_upper_bound(r);
2019-12-13T00:19:20.6180898Z 
2019-12-13T00:19:20.9785552Z     Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
2019-12-13T00:19:21.5334652Z error[E0308]: mismatched types
2019-12-13T00:19:21.5335182Z    --> src/librustc_mir/borrow_check/region_infer/mod.rs:914:29
2019-12-13T00:19:21.5335182Z    --> src/librustc_mir/borrow_check/region_infer/mod.rs:914:29
2019-12-13T00:19:21.5335459Z     |
2019-12-13T00:19:21.5335784Z 914 |                     .buffer(errors_buffer);
2019-12-13T00:19:21.5336288Z     |                             ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.5336841Z     |
2019-12-13T00:19:21.5337351Z     = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:21.5337736Z                found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.6262250Z error[E0308]: mismatched types
2019-12-13T00:19:21.6262690Z    --> src/librustc_mir/borrow_check/region_infer/mod.rs:931:29
2019-12-13T00:19:21.6262955Z     |
2019-12-13T00:19:21.6262955Z     |
2019-12-13T00:19:21.6263307Z 931 |                     .buffer(errors_buffer);
2019-12-13T00:19:21.6263788Z     |                             ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.6264092Z     |
2019-12-13T00:19:21.6264502Z     = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:21.6264840Z                found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.7619184Z error[E0308]: mismatched types
2019-12-13T00:19:21.7619629Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1366:63
2019-12-13T00:19:21.7619895Z      |
2019-12-13T00:19:21.7619895Z      |
2019-12-13T00:19:21.7620319Z 1366 |         outlives_suggestion.add_suggestion(body, self, infcx, errors_buffer, region_naming);
2019-12-13T00:19:21.7620907Z      |                                                               ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.7621197Z      |
2019-12-13T00:19:21.7621568Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:21.7621902Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.7707075Z error[E0624]: method `report_or_propagate_universal_region_error` is private
2019-12-13T00:19:21.7707640Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1440:18
2019-12-13T00:19:21.7708062Z      |
2019-12-13T00:19:21.7708448Z 1440 |             self.report_or_propagate_universal_region_error(
2019-12-13T00:19:21.7708448Z 1440 |             self.report_or_propagate_universal_region_error(
2019-12-13T00:19:21.7708844Z      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-12-13T00:19:21.7713781Z 
2019-12-13T00:19:21.8652606Z error[E0308]: mismatched types
2019-12-13T00:19:21.8653036Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1474:63
2019-12-13T00:19:21.8653409Z      |
2019-12-13T00:19:21.8653838Z 1474 |         outlives_suggestion.add_suggestion(body, self, infcx, errors_buffer, region_naming);
2019-12-13T00:19:21.8654408Z      |                                                               ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.8655014Z      |
2019-12-13T00:19:21.8655545Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:21.8655976Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.8719794Z error[E0624]: method `report_or_propagate_universal_region_error` is private
2019-12-13T00:19:21.8720202Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1580:14
2019-12-13T00:19:21.8720465Z      |
2019-12-13T00:19:21.8720805Z 1580 |         self.report_or_propagate_universal_region_error(
2019-12-13T00:19:21.8720805Z 1580 |         self.report_or_propagate_universal_region_error(
2019-12-13T00:19:21.8721192Z      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-12-13T00:19:21.8726244Z 
2019-12-13T00:19:21.9846039Z error[E0308]: mismatched types
2019-12-13T00:19:21.9846580Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1689:21
2019-12-13T00:19:21.9846900Z      |
2019-12-13T00:19:21.9847284Z 1689 |             .buffer(errors_buffer);
2019-12-13T00:19:21.9847795Z      |                     ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:21.9848090Z      |
2019-12-13T00:19:21.9848572Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-13T00:19:21.9848954Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-13T00:19:22.1447884Z     Checking rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
2019-12-13T00:19:22.7293406Z     Checking rustc_plugin_impl v0.0.0 (/checkout/src/librustc_plugin_impl)
2019-12-13T00:19:22.9672329Z     Checking rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
2019-12-13T00:19:25.6225334Z     Checking rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
---
2019-12-13T00:19:30.1470075Z   local time: Fri Dec 13 00:19:30 UTC 2019
2019-12-13T00:19:30.2880365Z   network time: Fri, 13 Dec 2019 00:19:30 GMT
2019-12-13T00:19:30.2880644Z == end clock drift check ==
2019-12-13T00:19:31.6764596Z 
2019-12-13T00:19:31.6878253Z ##[error]Bash exited with code '1'.
2019-12-13T00:19:31.6908446Z ##[section]Starting: Checkout
2019-12-13T00:19:31.6909993Z ==============================================================================
2019-12-13T00:19:31.6910060Z Task         : Get sources
2019-12-13T00:19:31.6910102Z 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)

@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-12-14T04:44:20.7920804Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-14T04:44:21.7607706Z ##[command]git config gc.auto 0
2019-12-14T04:44:21.7610637Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-14T04:44:21.7612394Z ##[command]git config --get-all http.proxy
2019-12-14T04:44:21.7614692Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-14T04:51:50.1120013Z     Checking syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
2019-12-14T04:52:30.7742856Z     Checking rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-12-14T04:52:32.4842955Z     Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-12-14T04:52:34.0524871Z     Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-12-14T04:52:34.9277605Z error[E0433]: failed to resolve: use of undeclared type or module `ClosureOutlivesSubject`
2019-12-14T04:52:34.9278462Z     |
2019-12-14T04:52:34.9278462Z     |
2019-12-14T04:52:34.9278856Z 175 |                         subject: ClosureOutlivesSubject::Region(fr_minus),
2019-12-14T04:52:34.9279348Z     |                                  ^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `ClosureOutlivesSubject`
2019-12-14T04:52:35.2517420Z error[E0412]: cannot find type `GenericKind` in this scope
2019-12-14T04:52:35.2517867Z   --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:73:18
2019-12-14T04:52:35.2518136Z    |
2019-12-14T04:52:35.2518524Z 73 |         generic: GenericKind<'tcx>,
2019-12-14T04:52:35.2518524Z 73 |         generic: GenericKind<'tcx>,
2019-12-14T04:52:35.2518923Z    |                  ^^^^^^^^^^^ not found in this scope
2019-12-14T04:52:35.2519195Z    |
2019-12-14T04:52:35.2519521Z help: possible candidate is found in another module, you can import it into scope
2019-12-14T04:52:35.2519821Z    |
2019-12-14T04:52:35.2520166Z 3  | use rustc::infer::region_constraints::GenericKind;
2019-12-14T04:52:35.2520406Z    |
2019-12-14T04:52:35.2520443Z 
2019-12-14T04:52:35.2560028Z error[E0412]: cannot find type `ClosureOutlivesRequirement` in this scope
2019-12-14T04:52:35.2560742Z     |
2019-12-14T04:52:35.2560742Z     |
2019-12-14T04:52:35.2561202Z 137 |         propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'tcx>>>,
2019-12-14T04:52:35.2561985Z     |
2019-12-14T04:52:35.2562365Z help: possible candidate is found in another module, you can import it into scope
2019-12-14T04:52:35.2562641Z     |
2019-12-14T04:52:35.2562641Z     |
2019-12-14T04:52:35.2563013Z 3   | use rustc::mir::ClosureOutlivesRequirement;
2019-12-14T04:52:35.2563325Z 
2019-12-14T04:52:35.2657098Z error[E0412]: cannot find type `ErrorReported` in this scope
2019-12-14T04:52:35.2657584Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:141:17
2019-12-14T04:52:35.2657839Z     |
2019-12-14T04:52:35.2657839Z     |
2019-12-14T04:52:35.2658169Z 141 |     ) -> Option<ErrorReported> {
2019-12-14T04:52:35.2658955Z     |
2019-12-14T04:52:35.2659305Z help: possible candidates are found in other modules, you can import them into scope
2019-12-14T04:52:35.2659546Z     |
2019-12-14T04:52:35.2659546Z     |
2019-12-14T04:52:35.2659857Z 3   | use rustc::util::common::ErrorReported;
2019-12-14T04:52:35.2660431Z 3   | use rustc_errors::ErrorReported;
2019-12-14T04:52:35.2660672Z     |
2019-12-14T04:52:35.2660727Z 
2019-12-14T04:52:35.2660727Z 
2019-12-14T04:52:35.2661067Z error[E0422]: cannot find struct, variant or union type `ClosureOutlivesRequirement` in this scope
2019-12-14T04:52:35.2661713Z     |
2019-12-14T04:52:35.2661713Z     |
2019-12-14T04:52:35.2662113Z 174 |                     propagated_outlives_requirements.push(ClosureOutlivesRequirement {
2019-12-14T04:52:35.2662895Z     |
2019-12-14T04:52:35.2663249Z help: possible candidate is found in another module, you can import it into scope
2019-12-14T04:52:35.2663542Z     |
2019-12-14T04:52:35.2663542Z     |
2019-12-14T04:52:35.2663893Z 3   | use rustc::mir::ClosureOutlivesRequirement;
2019-12-14T04:52:35.2664228Z 
2019-12-14T04:52:35.2664555Z error[E0425]: cannot find value `ErrorReported` in this scope
2019-12-14T04:52:35.2664907Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:206:14
2019-12-14T04:52:35.2665189Z     |
2019-12-14T04:52:35.2665189Z     |
2019-12-14T04:52:35.2665525Z 206 |         Some(ErrorReported)
2019-12-14T04:52:35.2665927Z     |              ^^^^^^^^^^^^^ not found in this scope
2019-12-14T04:52:35.2666222Z     |
2019-12-14T04:52:35.2667079Z help: possible candidates are found in other modules, you can import them into scope
2019-12-14T04:52:35.2667347Z     |
2019-12-14T04:52:35.2667681Z 3   | use rustc::util::common::ErrorReported;
2019-12-14T04:52:35.2668227Z 3   | use rustc_errors::ErrorReported;
2019-12-14T04:52:35.2668484Z     |
2019-12-14T04:52:35.2668520Z 
2019-12-14T04:52:35.5595289Z error: unused import: `Diagnostic`
2019-12-14T04:52:35.5595289Z error: unused import: `Diagnostic`
2019-12-14T04:52:35.5595617Z   --> src/librustc_mir/borrow_check/region_infer/mod.rs:21:20
2019-12-14T04:52:35.5596038Z    |
2019-12-14T04:52:35.5596915Z 21 | use rustc_errors::{Diagnostic, DiagnosticBuilder};
2019-12-14T04:52:35.5597654Z    |
2019-12-14T04:52:35.5597958Z    = note: `-D unused-imports` implied by `-D warnings`
2019-12-14T04:52:35.5597997Z 
2019-12-14T04:52:37.9295008Z error[E0308]: mismatched types
2019-12-14T04:52:37.9295008Z error[E0308]: mismatched types
2019-12-14T04:52:37.9297127Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:204:19
2019-12-14T04:52:37.9297989Z     |
2019-12-14T04:52:37.9298776Z 204 |         db.buffer(errors_buffer);
2019-12-14T04:52:37.9299722Z     |                   ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:37.9300381Z     |
2019-12-14T04:52:37.9301177Z     = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-14T04:52:37.9301933Z                found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:37.9342311Z error[E0624]: method `universal_upper_bound` is private
2019-12-14T04:52:37.9343145Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:226:36
2019-12-14T04:52:37.9343874Z     |
2019-12-14T04:52:37.9343874Z     |
2019-12-14T04:52:37.9344639Z 226 |             let upper_bound = self.universal_upper_bound(r);
2019-12-14T04:52:37.9345725Z 
2019-12-14T04:52:38.8241930Z error[E0308]: mismatched types
2019-12-14T04:52:38.8242305Z    --> src/librustc_mir/borrow_check/region_infer/mod.rs:915:29
2019-12-14T04:52:38.8242507Z     |
2019-12-14T04:52:38.8242507Z     |
2019-12-14T04:52:38.8242786Z 915 |                     .buffer(errors_buffer);
2019-12-14T04:52:38.8243151Z     |                             ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:38.8243374Z     |
2019-12-14T04:52:38.8243671Z     = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-14T04:52:38.8243933Z                found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.2080322Z     Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
2019-12-14T04:52:39.2718197Z error[E0308]: mismatched types
2019-12-14T04:52:39.2718668Z    --> src/librustc_mir/borrow_check/region_infer/mod.rs:926:36
2019-12-14T04:52:39.2718934Z     |
2019-12-14T04:52:39.2718934Z     |
2019-12-14T04:52:39.2719311Z 926 |                   errors_buffer.push(RegionErrorKind::TypeTestDoesNotLiveLongEnough {
2019-12-14T04:52:39.2720344Z 927 | |                     span: type_test_span,
2019-12-14T04:52:39.2720344Z 927 | |                     span: type_test_span,
2019-12-14T04:52:39.2720715Z 928 | |                     generic: type_test.generic_kind,
2019-12-14T04:52:39.2721246Z 929 | |                 });
2019-12-14T04:52:39.2721660Z     | |_________________^ expected (), found enum `borrow_check::diagnostics::region_errors::RegionErrorKind`
2019-12-14T04:52:39.2722238Z     = note: expected type `()`
2019-12-14T04:52:39.2722578Z                found type `borrow_check::diagnostics::region_errors::RegionErrorKind<'_>`
2019-12-14T04:52:39.2727849Z 
2019-12-14T04:52:39.4255505Z error[E0308]: mismatched types
2019-12-14T04:52:39.4255505Z error[E0308]: mismatched types
2019-12-14T04:52:39.4255872Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1374:63
2019-12-14T04:52:39.4256147Z      |
2019-12-14T04:52:39.4256501Z 1374 |         outlives_suggestion.add_suggestion(body, self, infcx, errors_buffer, region_naming);
2019-12-14T04:52:39.4256940Z      |                                                               ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.4257313Z      |
2019-12-14T04:52:39.4258131Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-14T04:52:39.4258457Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.4258829Z error[E0624]: method `report_or_propagate_universal_region_error` is private
2019-12-14T04:52:39.4259119Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1448:18
2019-12-14T04:52:39.4259388Z      |
2019-12-14T04:52:39.4259724Z 1448 |             self.report_or_propagate_universal_region_error(
2019-12-14T04:52:39.4259724Z 1448 |             self.report_or_propagate_universal_region_error(
2019-12-14T04:52:39.4260061Z      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-12-14T04:52:39.4260121Z 
2019-12-14T04:52:39.5193578Z error[E0308]: mismatched types
2019-12-14T04:52:39.5195243Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1482:63
2019-12-14T04:52:39.5196000Z      |
2019-12-14T04:52:39.5196791Z 1482 |         outlives_suggestion.add_suggestion(body, self, infcx, errors_buffer, region_naming);
2019-12-14T04:52:39.5198497Z      |                                                               ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.5199192Z      |
2019-12-14T04:52:39.5199802Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-14T04:52:39.5200674Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.5260883Z error[E0624]: method `report_or_propagate_universal_region_error` is private
2019-12-14T04:52:39.5261621Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1588:14
2019-12-14T04:52:39.5262441Z      |
2019-12-14T04:52:39.5263065Z 1588 |         self.report_or_propagate_universal_region_error(
2019-12-14T04:52:39.5263065Z 1588 |         self.report_or_propagate_universal_region_error(
2019-12-14T04:52:39.5263642Z      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-12-14T04:52:39.5263852Z 
2019-12-14T04:52:39.6191515Z error[E0308]: mismatched types
2019-12-14T04:52:39.6192574Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1697:21
2019-12-14T04:52:39.6193149Z      |
2019-12-14T04:52:39.6193703Z 1697 |             .buffer(errors_buffer);
2019-12-14T04:52:39.6194419Z      |                     ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:39.6194933Z      |
2019-12-14T04:52:39.6195581Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-14T04:52:39.6196147Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-14T04:52:40.3562679Z     Checking rustc_traits v0.0.0 (/checkout/src/librustc_traits)
2019-12-14T04:52:41.5389445Z     Checking rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
2019-12-14T04:52:42.1231724Z     Checking rustc_plugin_impl v0.0.0 (/checkout/src/librustc_plugin_impl)
2019-12-14T04:52:42.3313944Z     Checking rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
---
2019-12-14T04:52:45.1079103Z For more information about an error, try `rustc --explain E0308`.
2019-12-14T04:52:45.1841980Z error: could not compile `rustc_mir`.
2019-12-14T04:52:45.1842327Z warning: build failed, waiting for other jobs to finish...
2019-12-14T04:52:45.4149934Z error: build failed
2019-12-14T04:52:45.4185944Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-12-14T04:52:45.4198482Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-12-14T04:52:45.4199049Z Build completed unsuccessfully in 0:05:02
2019-12-14T04:52:45.4261835Z == clock drift check ==
2019-12-14T04:52:45.4279188Z   local time: Sat Dec 14 04:52:45 UTC 2019
2019-12-14T04:52:45.4279188Z   local time: Sat Dec 14 04:52:45 UTC 2019
2019-12-14T04:52:45.7102655Z   network time: Sat, 14 Dec 2019 04:52:45 GMT
2019-12-14T04:52:45.7108060Z == end clock drift check ==
2019-12-14T04:52:46.9444834Z 
2019-12-14T04:52:46.9560036Z ##[error]Bash exited with code '1'.
2019-12-14T04:52:46.9593170Z ##[section]Starting: Checkout
2019-12-14T04:52:46.9595222Z ==============================================================================
2019-12-14T04:52:46.9595285Z Task         : Get sources
2019-12-14T04:52:46.9595516Z 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)

@matthewjasper matthewjasper self-assigned this Dec 14, 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-12-16T02:16:49.9643403Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-16T02:16:50.9809493Z ##[command]git config gc.auto 0
2019-12-16T02:16:50.9815290Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-16T02:16:50.9818660Z ##[command]git config --get-all http.proxy
2019-12-16T02:16:50.9820840Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-16T02:24:41.2310846Z     Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-12-16T02:24:44.8391518Z error[E0624]: method `universal_upper_bound` is private
2019-12-16T02:24:44.8393370Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:167:36
2019-12-16T02:24:44.8393928Z     |
2019-12-16T02:24:44.8394496Z 167 |             let upper_bound = self.universal_upper_bound(r);
2019-12-16T02:24:44.8395234Z 
2019-12-16T02:24:46.1294300Z error[E0308]: mismatched types
2019-12-16T02:24:46.1301464Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1467:16
2019-12-16T02:24:46.1302544Z      |
2019-12-16T02:24:46.1302544Z      |
2019-12-16T02:24:46.1302776Z 1467 |             if propagated {
2019-12-16T02:24:46.1303100Z      |                ^^^^^^^^^^ expected bool, found enum `std::option::Option`
2019-12-16T02:24:46.1303315Z      |
2019-12-16T02:24:46.1303731Z      = note: expected type `bool`
2019-12-16T02:24:46.1303966Z                 found type `std::option::Option<syntax::rustc_errors::ErrorReported>`
2019-12-16T02:24:46.1304358Z error[E0308]: mismatched types
2019-12-16T02:24:46.1304593Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1468:24
2019-12-16T02:24:46.1304767Z      |
2019-12-16T02:24:46.1304975Z 1468 |                 return None;
---
2019-12-16T02:24:46.1306808Z      |
2019-12-16T02:24:46.1307048Z 1485 |                 longer_fr,
2019-12-16T02:24:46.1307295Z      |                 ^^^^^^^^^
2019-12-16T02:24:46.1307526Z      |                 |
2019-12-16T02:24:46.1307795Z      |                 expected struct `rustc::ty::RegionVid`, found reference
2019-12-16T02:24:46.1308083Z      |                 help: consider dereferencing the borrow: `*longer_fr`
2019-12-16T02:24:46.1309102Z      = note: expected type `rustc::ty::RegionVid`
2019-12-16T02:24:46.1309381Z                 found type `&rustc::ty::RegionVid`
2019-12-16T02:24:46.1309419Z 
2019-12-16T02:24:46.1309668Z error[E0308]: mismatched types
2019-12-16T02:24:46.1309668Z error[E0308]: mismatched types
2019-12-16T02:24:46.1309969Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1487:17
2019-12-16T02:24:46.1310188Z      |
2019-12-16T02:24:46.1310598Z 1487 |                 shorter_fr,
2019-12-16T02:24:46.1310941Z      |                 ^^^^^^^^^^
2019-12-16T02:24:46.1311211Z      |                 |
2019-12-16T02:24:46.1311529Z      |                 expected struct `rustc::ty::RegionVid`, found reference
2019-12-16T02:24:46.1312086Z      |                 help: consider dereferencing the borrow: `*shorter_fr`
2019-12-16T02:24:46.1312755Z      = note: expected type `rustc::ty::RegionVid`
2019-12-16T02:24:46.1313146Z                 found type `&rustc::ty::RegionVid`
2019-12-16T02:24:46.1313175Z 
2019-12-16T02:24:46.1313371Z error[E0308]: mismatched types
2019-12-16T02:24:46.1313371Z error[E0308]: mismatched types
2019-12-16T02:24:46.1313616Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1488:17
2019-12-16T02:24:46.1313789Z      |
2019-12-16T02:24:46.1314010Z 1488 |                 outlives_suggestion,
2019-12-16T02:24:46.1314248Z      |                 ^^^^^^^^^^^^^^^^^^^
2019-12-16T02:24:46.1314461Z      |                 |
2019-12-16T02:24:46.1314928Z      |                 expected mutable reference, found struct `borrow_check::diagnostics::outlives_suggestion::OutlivesSuggestionBuilder`
2019-12-16T02:24:46.1315389Z      |
2019-12-16T02:24:46.1315389Z      |
2019-12-16T02:24:46.1315661Z      = note: expected type `&mut borrow_check::diagnostics::outlives_suggestion::OutlivesSuggestionBuilder<'_>`
2019-12-16T02:24:46.1315928Z                 found type `borrow_check::diagnostics::outlives_suggestion::OutlivesSuggestionBuilder<'_>`
2019-12-16T02:24:46.1316139Z error[E0308]: mismatched types
2019-12-16T02:24:46.1316375Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1492:23
2019-12-16T02:24:46.1316548Z      |
2019-12-16T02:24:46.1316548Z      |
2019-12-16T02:24:46.1316761Z 1492 |             db.buffer(errors_buffer);
2019-12-16T02:24:46.1317106Z      |                       ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-16T02:24:46.1317286Z      |
2019-12-16T02:24:46.1317554Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-16T02:24:46.1318216Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors<'tcx>`
2019-12-16T02:24:46.2438391Z error[E0308]: mismatched types
2019-12-16T02:24:46.2438877Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1634:12
2019-12-16T02:24:46.2439201Z      |
2019-12-16T02:24:46.2439509Z 1634 |         if propagated {
2019-12-16T02:24:46.2439509Z 1634 |         if propagated {
2019-12-16T02:24:46.2440102Z      |            ^^^^^^^^^^ expected bool, found enum `std::option::Option`
2019-12-16T02:24:46.2440416Z      |
2019-12-16T02:24:46.2440751Z      = note: expected type `bool`
2019-12-16T02:24:46.2441072Z                 found type `std::option::Option<syntax::rustc_errors::ErrorReported>`
2019-12-16T02:24:46.2569005Z     Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-12-16T02:24:46.3416429Z error[E0308]: mismatched types
2019-12-16T02:24:46.3417103Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1660:19
2019-12-16T02:24:46.3417528Z      |
2019-12-16T02:24:46.3417528Z      |
2019-12-16T02:24:46.3418410Z 1660 |         db.buffer(errors_buffer);
2019-12-16T02:24:46.3418917Z      |                   ^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `borrow_check::diagnostics::region_errors::RegionErrors`
2019-12-16T02:24:46.3419159Z      |
2019-12-16T02:24:46.3419499Z      = note: expected type `&mut std::vec::Vec<syntax::rustc_errors::Diagnostic>`
2019-12-16T02:24:46.3419830Z                 found type `&mut borrow_check::diagnostics::region_errors::RegionErrors<'tcx>`
2019-12-16T02:24:46.3492610Z error[E0308]: mismatched types
2019-12-16T02:24:46.3492895Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1712:24
2019-12-16T02:24:46.3493081Z      |
2019-12-16T02:24:46.3493081Z      |
2019-12-16T02:24:46.3493299Z 1680 |     ) -> Option<ErrorReported> {
2019-12-16T02:24:46.3493633Z      |          --------------------- expected `std::option::Option<syntax::rustc_errors::ErrorReported>` because of return type
2019-12-16T02:24:46.3494023Z 1712 |                 return true;
2019-12-16T02:24:46.3494300Z      |                        ^^^^ expected enum `std::option::Option`, found bool
2019-12-16T02:24:46.3494481Z      |
2019-12-16T02:24:46.3494481Z      |
2019-12-16T02:24:46.3494751Z      = note: expected type `std::option::Option<syntax::rustc_errors::ErrorReported>`
2019-12-16T02:24:46.3499782Z 
2019-12-16T02:24:46.4464500Z error[E0308]: mismatched types
2019-12-16T02:24:46.4464806Z     --> src/librustc_mir/borrow_check/region_infer/mod.rs:1716:9
2019-12-16T02:24:46.4464981Z      |
2019-12-16T02:24:46.4464981Z      |
2019-12-16T02:24:46.4465221Z 1680 |     ) -> Option<ErrorReported> {
2019-12-16T02:24:46.4465547Z      |          --------------------- expected `std::option::Option<syntax::rustc_errors::ErrorReported>` because of return type
2019-12-16T02:24:46.4465970Z 1716 |         false
2019-12-16T02:24:46.4466386Z      |         ^^^^^ expected enum `std::option::Option`, found bool
2019-12-16T02:24:46.4466780Z      |
2019-12-16T02:24:46.4466780Z      |
2019-12-16T02:24:46.4467043Z      = note: expected type `std::option::Option<syntax::rustc_errors::ErrorReported>`
2019-12-16T02:24:46.4473313Z 
2019-12-16T02:24:47.7752752Z     Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
2019-12-16T02:24:48.7903593Z     Checking rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
2019-12-16T02:24:49.3149961Z     Checking rustc_plugin_impl v0.0.0 (/checkout/src/librustc_plugin_impl)
---
2019-12-16T02:24:51.6923627Z For more information about an error, try `rustc --explain E0308`.
2019-12-16T02:24:51.7589509Z error: could not compile `rustc_mir`.
2019-12-16T02:24:51.7589950Z warning: build failed, waiting for other jobs to finish...
2019-12-16T02:24:52.0606744Z error: build failed
2019-12-16T02:24:52.0643684Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-12-16T02:24:52.0663247Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-12-16T02:24:52.0664286Z Build completed unsuccessfully in 0:04:47
2019-12-16T02:24:52.0718832Z == clock drift check ==
2019-12-16T02:24:52.0733472Z   local time: Mon Dec 16 02:24:52 UTC 2019
2019-12-16T02:24:52.0733472Z   local time: Mon Dec 16 02:24:52 UTC 2019
2019-12-16T02:24:52.3574353Z   network time: Mon, 16 Dec 2019 02:24:52 GMT
2019-12-16T02:24:52.3575872Z == end clock drift check ==
2019-12-16T02:24:53.5785271Z 
2019-12-16T02:24:53.5877705Z ##[error]Bash exited with code '1'.
2019-12-16T02:24:53.5903766Z ##[section]Starting: Checkout
2019-12-16T02:24:53.5905726Z ==============================================================================
2019-12-16T02:24:53.5905806Z Task         : Get sources
2019-12-16T02:24:53.5905846Z 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
Copy link
Member Author

That last commit was quite satisfying! Look at all of those arguments that were being passed around solely to generate diagnostics!

@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-12-16T16:54:32.8309764Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-16T16:54:32.8576186Z ##[command]git config gc.auto 0
2019-12-16T16:54:32.8672100Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-16T16:54:32.8739735Z ##[command]git config --get-all http.proxy
2019-12-16T16:54:32.8907127Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-16T17:03:08.3312255Z     Checking rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
2019-12-16T17:03:11.1136586Z     Checking rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
2019-12-16T17:03:11.6615207Z     Checking rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-16T17:03:16.0426316Z     Checking rustc_save_analysis v0.0.0 (/checkout/src/librustc_save_analysis)
2019-12-16T17:03:17.1842977Z error: method is never used: `get_var_name_and_span_for_region`
2019-12-16T17:03:17.1843396Z   --> src/librustc_mir/borrow_check/diagnostics/var_name.rs:10:5
2019-12-16T17:03:17.1844660Z 10 | /     crate fn get_var_name_and_span_for_region(
2019-12-16T17:03:17.1845039Z 11 | |         &self,
2019-12-16T17:03:17.1867223Z 12 | |         tcx: TyCtxt<'tcx>,
2019-12-16T17:03:17.1867684Z 13 | |         body: &Body<'tcx>,
2019-12-16T17:03:17.1867684Z 13 | |         body: &Body<'tcx>,
2019-12-16T17:03:17.1867995Z ...  |
2019-12-16T17:03:17.1868311Z 33 | |             })
2019-12-16T17:03:17.1868606Z 34 | |     }
2019-12-16T17:03:17.1868887Z    | |_____^
2019-12-16T17:03:17.1869112Z    |
2019-12-16T17:03:17.1869397Z    = note: `-D dead-code` implied by `-D warnings`
2019-12-16T17:03:17.1869452Z 
2019-12-16T17:03:17.1869710Z error: method is never used: `was_named`
2019-12-16T17:03:17.1870319Z     |
2019-12-16T17:03:17.1870319Z     |
2019-12-16T17:03:17.1870621Z 109 |     crate fn was_named(&self) -> bool {
2019-12-16T17:03:17.1871025Z 
2019-12-16T17:03:17.1871025Z 
2019-12-16T17:03:17.1954008Z error: enum is never used: `SuggestedConstraint`
2019-12-16T17:03:17.1954421Z   --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:23:1
2019-12-16T17:03:17.1955038Z 23 | enum SuggestedConstraint {
2019-12-16T17:03:17.1955312Z    | ^^^^^^^^^^^^^^^^^^^^^^^^
2019-12-16T17:03:17.1955406Z 
2019-12-16T17:03:17.1955406Z 
2019-12-16T17:03:17.1959177Z error: struct is never constructed: `OutlivesSuggestionBuilder`
2019-12-16T17:03:17.1959496Z   --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:38:1
2019-12-16T17:03:17.1959759Z    |
2019-12-16T17:03:17.1960059Z 38 | pub struct OutlivesSuggestionBuilder<'a> {
2019-12-16T17:03:17.1960385Z 
2019-12-16T17:03:17.1972880Z error: method is never used: `new`
2019-12-16T17:03:17.1973215Z   --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:54:5
2019-12-16T17:03:17.1973471Z    |
2019-12-16T17:03:17.1973471Z    |
2019-12-16T17:03:17.1975134Z 54 | /     crate fn new(
2019-12-16T17:03:17.1975703Z 55 | |         mir_def_id: DefId,
2019-12-16T17:03:17.1976202Z 56 | |         local_names: &'a IndexVec<Local, Option<Symbol>>,
2019-12-16T17:03:17.1976822Z ...  |
2019-12-16T17:03:17.1977134Z 62 | |         }
2019-12-16T17:03:17.1977428Z 63 | |     }
2019-12-16T17:03:17.1977698Z    | |_____^
2019-12-16T17:03:17.1977698Z    | |_____^
2019-12-16T17:03:17.1977747Z 
2019-12-16T17:03:17.1978023Z error: method is never used: `region_name_is_suggestable`
2019-12-16T17:03:17.1978327Z   --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:75:5
2019-12-16T17:03:17.1978731Z    |
2019-12-16T17:03:17.1979089Z 75 |     fn region_name_is_suggestable(name: &RegionName) -> bool {
2019-12-16T17:03:17.1979512Z 
2019-12-16T17:03:17.1979789Z error: method is never used: `region_vid_to_name`
2019-12-16T17:03:17.1980093Z    --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:98:5
2019-12-16T17:03:17.1980380Z     |
2019-12-16T17:03:17.1980380Z     |
2019-12-16T17:03:17.1980754Z 98  | /     fn region_vid_to_name(
2019-12-16T17:03:17.1981673Z 99  | |         &self,
2019-12-16T17:03:17.1982112Z 100 | |         errctx: &ErrorReportingCtx<'_, '_, '_>,
2019-12-16T17:03:17.1982451Z 101 | |         renctx: &mut RegionErrorNamingCtx,
2019-12-16T17:03:17.1983057Z 107 | |             .filter(Self::region_name_is_suggestable)
2019-12-16T17:03:17.1983354Z 108 | |     }
2019-12-16T17:03:17.1983641Z     | |_____^
2019-12-16T17:03:17.1983678Z 
---
2019-12-16T17:03:17.1987338Z 
2019-12-16T17:03:17.1987596Z error: method is never used: `collect_constraint`
2019-12-16T17:03:17.1987915Z    --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:203:5
2019-12-16T17:03:17.1988143Z     |
2019-12-16T17:03:17.1988473Z 203 |     crate fn collect_constraint(&mut self, fr: RegionVid, outlived_fr: RegionVid) {
2019-12-16T17:03:17.1988878Z 
2019-12-16T17:03:17.1989153Z error: method is never used: `intermediate_suggestion`
2019-12-16T17:03:17.1989475Z    --> src/librustc_mir/borrow_check/diagnostics/outlives_suggestion.rs:212:5
2019-12-16T17:03:17.1989703Z     |
2019-12-16T17:03:17.1989703Z     |
2019-12-16T17:03:17.1990025Z 212 | /     crate fn intermediate_suggestion(
2019-12-16T17:03:17.1990347Z 213 | |         &mut self,
2019-12-16T17:03:17.1990684Z 214 | |         errctx: &ErrorReportingCtx<'_, '_, '_>,
2019-12-16T17:03:17.1991264Z 215 | |         errci: &ErrorConstraintInfo,
2019-12-16T17:03:17.1991917Z 232 | |         }
2019-12-16T17:03:17.1992212Z 233 | |     }
2019-12-16T17:03:17.1992483Z     | |_____^
2019-12-16T17:03:17.1992518Z 
---
2019-12-16T17:03:17.2150376Z 238 | |         &self,
2019-12-16T17:03:17.2150728Z 239 | |         body: &Body<'tcx>,
2019-12-16T17:03:17.2151354Z 240 | |         region_infcx: &RegionInferenceContext<'tcx>,
2019-12-16T17:03:17.2151701Z ...   |
2019-12-16T17:03:17.2152037Z 317 | |         diag.buffer(errors_buffer);
2019-12-16T17:03:17.2152613Z     | |_____^
2019-12-16T17:03:17.2152862Z 
2019-12-16T17:03:17.2183759Z error: field is never used: `region_infcx`
2019-12-16T17:03:17.2184137Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:115:5
2019-12-16T17:03:17.2184137Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:115:5
2019-12-16T17:03:17.2184547Z     |
2019-12-16T17:03:17.2184936Z 115 |     pub(super) region_infcx: &'b RegionInferenceContext<'tcx>,
2019-12-16T17:03:17.2185319Z 
2019-12-16T17:03:17.2185582Z error: method is never used: `report_error`
2019-12-16T17:03:17.2185900Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:460:5
2019-12-16T17:03:17.2186135Z     |
2019-12-16T17:03:17.2186135Z     |
2019-12-16T17:03:17.2186486Z 460 | /     pub(in crate::borrow_check) fn report_error<'a>(
2019-12-16T17:03:17.2186847Z 461 | |         &'a self,
2019-12-16T17:03:17.2187168Z 462 | |         body: &Body<'tcx>,
2019-12-16T17:03:17.2187513Z 463 | |         local_names: &IndexVec<Local, Option<Symbol>>,
2019-12-16T17:03:17.2188081Z 533 | |         }
2019-12-16T17:03:17.2188376Z 534 | |     }
2019-12-16T17:03:17.2188660Z     | |_____^
2019-12-16T17:03:17.2188696Z 
2019-12-16T17:03:17.2188696Z 
2019-12-16T17:03:17.2188959Z error: method is never used: `report_fnmut_error`
2019-12-16T17:03:17.2189514Z     |
2019-12-16T17:03:17.2189822Z 579 | /     fn report_fnmut_error(
2019-12-16T17:03:17.2190139Z 580 | |         &self,
2019-12-16T17:03:17.2190139Z 580 | |         &self,
2019-12-16T17:03:17.2190480Z 581 | |         errctx: &ErrorReportingCtx<'_, '_, 'tcx>,
2019-12-16T17:03:17.2190808Z 582 | |         errci: &ErrorConstraintInfo,
2019-12-16T17:03:17.2191719Z 627 | |         diag
2019-12-16T17:03:17.2192028Z 628 | |     }
2019-12-16T17:03:17.2192311Z     | |_____^
2019-12-16T17:03:17.2192347Z 
2019-12-16T17:03:17.2192347Z 
2019-12-16T17:03:17.2219863Z error: method is never used: `report_escaping_data_error`
2019-12-16T17:03:17.2220247Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:642:5
2019-12-16T17:03:17.2220487Z     |
2019-12-16T17:03:17.2220810Z 642 | /     fn report_escaping_data_error(
2019-12-16T17:03:17.2221733Z 643 | |         &self,
2019-12-16T17:03:17.2222083Z 644 | |         errctx: &ErrorReportingCtx<'_, '_, 'tcx>,
2019-12-16T17:03:17.2222543Z 645 | |         errci: &ErrorConstraintInfo,
2019-12-16T17:03:17.2223189Z 721 | |         diag
2019-12-16T17:03:17.2223501Z 722 | |     }
2019-12-16T17:03:17.2223759Z     | |_____^
2019-12-16T17:03:17.2227455Z 
2019-12-16T17:03:17.2227455Z 
2019-12-16T17:03:17.2307132Z error: method is never used: `report_general_error`
2019-12-16T17:03:17.2307581Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:739:5
2019-12-16T17:03:17.2307823Z     |
2019-12-16T17:03:17.2308173Z 739 | /     fn report_general_error(
2019-12-16T17:03:17.2308493Z 740 | |         &self,
2019-12-16T17:03:17.2308835Z 741 | |         errctx: &ErrorReportingCtx<'_, '_, 'tcx>,
2019-12-16T17:03:17.2309181Z 742 | |         errci: &ErrorConstraintInfo,
2019-12-16T17:03:17.2309740Z 794 | |         diag
2019-12-16T17:03:17.2310071Z 795 | |     }
2019-12-16T17:03:17.2310329Z     | |_____^
2019-12-16T17:03:17.2314369Z 
2019-12-16T17:03:17.2314369Z 
2019-12-16T17:03:17.2319575Z error: method is never used: `add_static_impl_trait_suggestion`
2019-12-16T17:03:17.2319921Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:806:5
2019-12-16T17:03:17.2320160Z     |
2019-12-16T17:03:17.2320511Z 806 | /     fn add_static_impl_trait_suggestion(
2019-12-16T17:03:17.2320820Z 807 | |         &self,
2019-12-16T17:03:17.2321147Z 808 | |         infcx: &InferCtxt<'_, 'tcx>,
2019-12-16T17:03:17.2321520Z 809 | |         diag: &mut DiagnosticBuilder<'_>,
2019-12-16T17:03:17.2322466Z 886 | |         }
2019-12-16T17:03:17.2322768Z 887 | |     }
2019-12-16T17:03:17.2323024Z     | |_____^
2019-12-16T17:03:17.2385140Z 
2019-12-16T17:03:17.2385140Z 
2019-12-16T17:03:17.2386165Z error: method is never used: `is_closure_fn_mut`
2019-12-16T17:03:17.2386504Z    --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:992:5
2019-12-16T17:03:17.2387061Z     |
2019-12-16T17:03:17.2387435Z 992 |     crate fn is_closure_fn_mut(&self, infcx: &InferCtxt<'_, 'tcx>, fr: RegionVid) -> bool {
2019-12-16T17:03:17.2387951Z 
2019-12-16T17:03:17.2826780Z error: usage of qualified `ty::Ty<'tcx>`
2019-12-16T17:03:17.2827184Z   --> src/librustc_mir/borrow_check/diagnostics/region_errors.rs:96:20
2019-12-16T17:03:17.2827433Z    |
2019-12-16T17:03:17.2827433Z    |
2019-12-16T17:03:17.2827750Z 96 |         hidden_ty: ty::Ty<'tcx>,
2019-12-16T17:03:17.2828110Z    |                    ^^^^^^^^^^^^ help: try using it unqualified: `Ty<'tcx>`
2019-12-16T17:03:17.2828396Z    |
2019-12-16T17:03:17.2828706Z    = note: `-D rustc::usage-of-qualified-ty` implied by `-D warnings`
2019-12-16T17:03:18.5244214Z error: aborting due to 19 previous errors
2019-12-16T17:03:18.5244899Z 
2019-12-16T17:03:18.5253879Z error: could not compile `rustc_mir`.
2019-12-16T17:03:18.5254644Z warning: build failed, waiting for other jobs to finish...
2019-12-16T17:03:18.5254644Z warning: build failed, waiting for other jobs to finish...
2019-12-16T17:03:21.7031392Z error: build failed
2019-12-16T17:03:21.7074119Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-12-16T17:03:21.7080798Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-12-16T17:03:21.7081182Z Build completed unsuccessfully in 0:05:32
2019-12-16T17:03:21.7136710Z == clock drift check ==
2019-12-16T17:03:21.7169453Z   local time: Mon Dec 16 17:03:21 UTC 2019
2019-12-16T17:03:21.7169453Z   local time: Mon Dec 16 17:03:21 UTC 2019
2019-12-16T17:03:21.9969044Z   network time: Mon, 16 Dec 2019 17:03:21 GMT
2019-12-16T17:03:21.9970053Z == end clock drift check ==
2019-12-16T17:03:23.3906945Z 
2019-12-16T17:03:23.4031765Z ##[error]Bash exited with code '1'.
2019-12-16T17:03:23.4069043Z ##[section]Starting: Checkout
2019-12-16T17:03:23.4070990Z ==============================================================================
2019-12-16T17:03:23.4071051Z Task         : Get sources
2019-12-16T17:03:23.4071138Z 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)

@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-12-16T17:19:41.1728785Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-16T17:19:41.2011763Z ##[command]git config gc.auto 0
2019-12-16T17:19:41.2086428Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-16T17:19:41.2161000Z ##[command]git config --get-all http.proxy
2019-12-16T17:19:41.2300818Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-16T17:27:40.3736163Z For more information about this error, try `rustc --explain E0425`.
2019-12-16T17:27:40.4374378Z error: could not compile `rustc_mir`.
2019-12-16T17:27:40.4374774Z warning: build failed, waiting for other jobs to finish...
2019-12-16T17:27:42.9626357Z error: build failed
2019-12-16T17:27:42.9653864Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-12-16T17:27:42.9678320Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-12-16T17:27:42.9678652Z Build completed unsuccessfully in 0:04:34
2019-12-16T17:27:42.9725985Z == clock drift check ==
2019-12-16T17:27:42.9741400Z   local time: Mon Dec 16 17:27:42 UTC 2019
2019-12-16T17:27:42.9741400Z   local time: Mon Dec 16 17:27:42 UTC 2019
2019-12-16T17:27:43.2419061Z   network time: Mon, 16 Dec 2019 17:27:43 GMT
2019-12-16T17:27:43.2422403Z == end clock drift check ==
2019-12-16T17:27:44.5314094Z 
2019-12-16T17:27:44.5412614Z ##[error]Bash exited with code '1'.
2019-12-16T17:27:44.5448123Z ##[section]Starting: Checkout
2019-12-16T17:27:44.5449881Z ==============================================================================
2019-12-16T17:27:44.5449936Z Task         : Get sources
2019-12-16T17:27:44.5449983Z 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-17T16:44:32.1414598Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-17T16:44:32.1666158Z ##[command]git config gc.auto 0
2019-12-17T16:44:32.1751283Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-17T16:44:32.1828384Z ##[command]git config --get-all http.proxy
2019-12-17T16:44:32.1983662Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-17T16:50:33.7444649Z    Compiling serde_json v1.0.40
2019-12-17T16:50:35.4847562Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-17T16:50:46.0510057Z     Finished release [optimized] target(s) in 1m 24s
2019-12-17T16:50:46.0611745Z tidy check
2019-12-17T16:50:47.0063246Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1570: TODO is deprecated; use FIXME
2019-12-17T16:50:47.0063644Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1572: line longer than 100 chars
2019-12-17T16:50:48.8210295Z some tidy checks failed
2019-12-17T16:50:48.8213689Z Found 485 error codes
2019-12-17T16:50:48.8216728Z Found 0 error codes with no tests
2019-12-17T16:50:48.8216982Z Done!
2019-12-17T16:50:48.8216982Z Done!
2019-12-17T16:50:48.8217228Z 
2019-12-17T16:50:48.8217368Z 
2019-12-17T16:50:48.8221446Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-17T16:50:48.8222189Z 
2019-12-17T16:50:48.8222315Z 
2019-12-17T16:50:48.8230217Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-17T16:50:48.8230568Z Build completed unsuccessfully in 0:01:28
2019-12-17T16:50:48.8230568Z Build completed unsuccessfully in 0:01:28
2019-12-17T16:50:48.8293735Z == clock drift check ==
2019-12-17T16:50:48.8306504Z   local time: Tue Dec 17 16:50:48 UTC 2019
2019-12-17T16:50:48.8698635Z   network time: Tue, 17 Dec 2019 16:50:48 GMT
2019-12-17T16:50:48.8702704Z == end clock drift check ==
2019-12-17T16:50:50.0921804Z 
2019-12-17T16:50:50.1037066Z ##[error]Bash exited with code '1'.
2019-12-17T16:50:50.1092657Z ##[section]Starting: Checkout
2019-12-17T16:50:50.1094732Z ==============================================================================
2019-12-17T16:50:50.1094796Z Task         : Get sources
2019-12-17T16:50:50.1094872Z 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-18T18:07:46.4039270Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-18T18:07:46.4239849Z ##[command]git config gc.auto 0
2019-12-18T18:07:46.4291467Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-18T18:07:46.4339580Z ##[command]git config --get-all http.proxy
2019-12-18T18:07:46.4475871Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-18T18:13:24.3530337Z    Compiling serde_json v1.0.40
2019-12-18T18:13:25.8476398Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-18T18:13:35.3532412Z     Finished release [optimized] target(s) in 1m 15s
2019-12-18T18:13:35.3626048Z tidy check
2019-12-18T18:13:36.1896627Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1570: TODO is deprecated; use FIXME
2019-12-18T18:13:36.1897439Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1572: line longer than 100 chars
2019-12-18T18:13:37.7559087Z Found 485 error codes
2019-12-18T18:13:37.7560923Z Found 0 error codes with no tests
2019-12-18T18:13:37.7561185Z Done!
2019-12-18T18:13:37.7561391Z some tidy checks failed
2019-12-18T18:13:37.7561391Z some tidy checks failed
2019-12-18T18:13:37.7561557Z 
2019-12-18T18:13:37.7561717Z 
2019-12-18T18:13:37.7562896Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-18T18:13:37.7563524Z 
2019-12-18T18:13:37.7563644Z 
2019-12-18T18:13:37.7571732Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-18T18:13:37.7571995Z Build completed unsuccessfully in 0:01:19
2019-12-18T18:13:37.7571995Z Build completed unsuccessfully in 0:01:19
2019-12-18T18:13:37.7625057Z == clock drift check ==
2019-12-18T18:13:37.7635201Z   local time: Wed Dec 18 18:13:37 UTC 2019
2019-12-18T18:13:38.0427914Z   network time: Wed, 18 Dec 2019 18:13:38 GMT
2019-12-18T18:13:38.0431958Z == end clock drift check ==
2019-12-18T18:13:39.5388701Z 
2019-12-18T18:13:39.5513860Z ##[error]Bash exited with code '1'.
2019-12-18T18:13:39.5541277Z ##[section]Starting: Checkout
2019-12-18T18:13:39.5543017Z ==============================================================================
2019-12-18T18:13:39.5543097Z Task         : Get sources
2019-12-18T18:13:39.5543146Z 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
Copy link
Member Author

mark-i-m commented Dec 18, 2019

@matthewjasper @eddyb I've rebased and consolidated my commits. The first one I've split out into #67404

The next two contain the meat so far. The remaining todos:

  • Make sure diagnostics are the same/don't regress (in particular, I'm currently seeing some difference on "outlives suggestions")
  • Actually remove the extra contexts. It looks like we can collapse ErrorReportingCtx and RegionNamingCtx into MirBorrowckCtx, but I need to take a closer look to see how do it cleanly. I think this should be done in a followup PR...

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-18T19:22:19.0234136Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-18T19:22:19.0404621Z ##[command]git config gc.auto 0
2019-12-18T19:22:19.0482416Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-18T19:22:19.0543549Z ##[command]git config --get-all http.proxy
2019-12-18T19:22:19.0701016Z ##[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/67241/merge:refs/remotes/pull/67241/merge
---
2019-12-18T19:27:53.5297214Z    Compiling serde_json v1.0.40
2019-12-18T19:27:55.1582003Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-12-18T19:28:05.8331403Z     Finished release [optimized] target(s) in 1m 23s
2019-12-18T19:28:05.8447133Z tidy check
2019-12-18T19:28:06.8083496Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1570: TODO is deprecated; use FIXME
2019-12-18T19:28:06.8084162Z tidy error: /checkout/src/librustc_mir/borrow_check/mod.rs:1572: line longer than 100 chars
2019-12-18T19:28:08.6254886Z some tidy checks failed
2019-12-18T19:28:08.6256381Z Found 485 error codes
2019-12-18T19:28:08.6256432Z Found 0 error codes with no tests
2019-12-18T19:28:08.6256723Z Done!
2019-12-18T19:28:08.6256723Z Done!
2019-12-18T19:28:08.6260284Z 
2019-12-18T19:28:08.6260446Z 
2019-12-18T19:28:08.6261467Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-12-18T19:28:08.6263379Z 
2019-12-18T19:28:08.6263694Z 
2019-12-18T19:28:08.6263883Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-12-18T19:28:08.6264071Z Build completed unsuccessfully in 0:01:27
2019-12-18T19:28:08.6264071Z Build completed unsuccessfully in 0:01:27
2019-12-18T19:28:08.6315740Z == clock drift check ==
2019-12-18T19:28:08.6327594Z   local time: Wed Dec 18 19:28:08 UTC 2019
2019-12-18T19:28:08.9018203Z   network time: Wed, 18 Dec 2019 19:28:08 GMT
2019-12-18T19:28:08.9018318Z == end clock drift check ==
2019-12-18T19:28:10.1978214Z 
2019-12-18T19:28:10.2046428Z ##[error]Bash exited with code '1'.
2019-12-18T19:28:10.2087790Z ##[section]Starting: Checkout
2019-12-18T19:28:10.2089588Z ==============================================================================
2019-12-18T19:28:10.2089648Z Task         : Get sources
2019-12-18T19:28:10.2089702Z 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 December 18, 2019 23:20
@mark-i-m
Copy link
Member Author

@matthewjasper @eddyb This is ready, but still blocked on #67404

@bors
Copy link
Contributor

bors commented Dec 22, 2019

📌 Commit 4dc7793 has been approved by matthewjasper

@bors
Copy link
Contributor

bors commented Dec 22, 2019

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

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 22, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2019
…=matthewjasper

Refactorings to borrowck region diagnostic reporting

This PR is a followup to rust-lang#66886 and rust-lang#67404

EDIT: updated

In this PR:  Clean up how errors are collected from NLL: introduce `borrow_check::diagnostics::RegionErrors` to collect errors. This is later passed to `MirBorrowckCtx::report_region_errors` after the `MirBorrowckCtx` is created. This will allow us to refactor away some of the extra context structs floating around (but we don't do it in this PR).  `borrow_check::region_infer` is now mostly free of diagnostic generating code. The signatures of most of the functions in `region_infer` lose somewhere between 4 and 7 arguments :)

Left for future (feedback appreciated):

- Merge `ErrorRegionCtx` with `MirBorrowckCtx`, as suggested by @matthewjasper in rust-lang#66886 (comment)
- Maybe move the contents of `borrow_check::nll` into `borrow_check` and remove the `nll` submodule altogether.
- Find a way to make `borrow_check::diagnostics::region_errors` less of a strange appendage to `RegionInferenceContext`. I'm not really sure how to do this yet. Ideas welcome.
@bors
Copy link
Contributor

bors commented Dec 23, 2019

☔ The latest upstream changes (presumably #67540) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 23, 2019
@mark-i-m
Copy link
Member Author

I squashed and rebased... I have not rerun tests because it takes forever on my laptop, but ./x.py check passes...

@mark-i-m
Copy link
Member Author

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 24, 2019
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 24, 2019

📌 Commit 05e3d20 has been approved by matthewjasper

@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 Dec 24, 2019
@bors
Copy link
Contributor

bors commented Dec 24, 2019

⌛ Testing commit 05e3d20 with merge a9c1c04...

bors added a commit that referenced this pull request Dec 24, 2019
Refactorings to borrowck region diagnostic reporting

This PR is a followup to #66886 and #67404

EDIT: updated

In this PR:  Clean up how errors are collected from NLL: introduce `borrow_check::diagnostics::RegionErrors` to collect errors. This is later passed to `MirBorrowckCtx::report_region_errors` after the `MirBorrowckCtx` is created. This will allow us to refactor away some of the extra context structs floating around (but we don't do it in this PR).  `borrow_check::region_infer` is now mostly free of diagnostic generating code. The signatures of most of the functions in `region_infer` lose somewhere between 4 and 7 arguments :)

Left for future (feedback appreciated):

- Merge `ErrorRegionCtx` with `MirBorrowckCtx`, as suggested by @matthewjasper in #66886 (comment)
- Maybe move the contents of `borrow_check::nll` into `borrow_check` and remove the `nll` submodule altogether.
- Find a way to make `borrow_check::diagnostics::region_errors` less of a strange appendage to `RegionInferenceContext`. I'm not really sure how to do this yet. Ideas welcome.
@bors
Copy link
Contributor

bors commented Dec 24, 2019

☀️ Test successful - checks-azure
Approved by: matthewjasper
Pushing a9c1c04 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 24, 2019
@bors bors merged commit 05e3d20 into rust-lang:master Dec 24, 2019
@mark-i-m mark-i-m deleted the simplify-borrow_check-3 branch December 28, 2019 16:42
bors added a commit that referenced this pull request Dec 30, 2019
Get rid of ErrorReportingCtx [5/N]

We can now use `MirBorrowckCtxt` instead :)

```
6 files changed, 122 insertions(+), 243 deletions(-)
```

This is a followup to (and thus blocked on) #67241.

r? @matthewjasper

cc @eddyb

I while try to do one more to get rid of the weird usage of `RegionInferenceCtx` in `borrow_check::diagnostics::{region_errors, region_naming}`. I think those uses can possibly also be refactored to use `MirBorrowckCtxt`...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

None yet

8 participants