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

Remove the borrow check::nll submodule #66886

Merged
merged 6 commits into from
Dec 12, 2019

Conversation

mark-i-m
Copy link
Member

NLL is the only borrow checker now, so no need to have a separate submodule.

@rustbot modify labels: +S-blocked

Waiting on #66815

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(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 Nov 30, 2019
@mark-i-m
Copy link
Member Author

r? @matthewjasper

@mark-i-m
Copy link
Member Author

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

@rustbot rustbot added S-blocked Status: 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 Nov 30, 2019
@mark-i-m
Copy link
Member Author

cc @eddyb

@mark-i-m
Copy link
Member Author

Also, just grepping, it looks like there are a lot of context structs in use in the rustc_mir::borrow_check module. Can any of these be merged (I suspect at least the region error reporting stuff can be)?

MirBorrowckCtxt               // from rustc_mir::borrow_check
BorrowCheckContext            // from rustc_mir::borrow_check::type_check
LivenessContext               // from rustc_mir::borrow_check::type_check
RegionInferenceContext        // from rustc_mir::borrow_check::region_infer
ErrorReportingCtx             // from rustc_mir::borrow_check::diagnostics:region_errors
RegionErrorNamingCtx          // from rustc_mir::borrow_check::diagnostics::region_naming

// From rustc::mir::visit
TyContext
MutatingUseContext
NonMutatingUseContext
NonUseContext
PlaceContext

// From rustc::infer
InferCtxt

// From rustc::ty
TyCtxt

@matthewjasper
Copy link
Contributor

ErrorReportingCtx can be replaced with MirBorrowckCtxt by not reporting those errors until the MirBorrowckCtxt is constructed.

@mark-i-m mark-i-m force-pushed the simplify-borrow_check-2 branch from f455e00 to 7ce2e15 Compare December 1, 2019 20:03
@bors
Copy link
Contributor

bors commented Dec 2, 2019

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

@mark-i-m mark-i-m force-pushed the simplify-borrow_check-2 branch from 7ce2e15 to 1fff534 Compare December 5, 2019 18:00
@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 5, 2019

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Dec 5, 2019
@bors
Copy link
Contributor

bors commented Dec 6, 2019

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

@mark-i-m mark-i-m force-pushed the simplify-borrow_check-2 branch from 1fff534 to 30ce5d2 Compare December 6, 2019 15:48
@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 6, 2019

Rebased, will possibly push more commits soon

@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 6, 2019

@matthewjasper Done!

@bors
Copy link
Contributor

bors commented Dec 6, 2019

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

@matthewjasper matthewjasper 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 7, 2019
@matthewjasper
Copy link
Contributor

r=me with merge conflicts fixed

@mark-i-m mark-i-m force-pushed the simplify-borrow_check-2 branch from 94c9e86 to 15e2b86 Compare December 7, 2019 18:44
@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 7, 2019

Rebased

@matthewjasper
Copy link
Contributor

@bors r+

@mark-i-m mark-i-m force-pushed the simplify-borrow_check-2 branch from 2cf227c to bc9582a Compare December 12, 2019 03:36
@mark-i-m
Copy link
Member Author

Rebased again. Would it be possible to get p=1 and avoid further rebasing please?

@matthewjasper
Copy link
Contributor

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Dec 12, 2019

📌 Commit bc9582a 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 12, 2019
@bors
Copy link
Contributor

bors commented Dec 12, 2019

⌛ Testing commit bc9582a with merge 4968f1f...

bors added a commit that referenced this pull request Dec 12, 2019
Remove the borrow check::nll submodule

NLL is the only borrow checker now, so no need to have a separate submodule.

@rustbot modify labels: +S-blocked

Waiting on #66815
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-tools 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-12T11:45:45.0787137Z Verifying status of clippy-driver...
2019-12-12T11:45:45.0787201Z Verifying status of miri...
2019-12-12T11:45:45.0787436Z Verifying status of embedded-book...
2019-12-12T11:45:45.0787635Z Verifying status of rustc-guide...
2019-12-12T11:45:45.0788075Z error: Tool `rls` should be test-pass but is test-fail during beta week.
2019-12-12T11:45:45.0794668Z Build completed unsuccessfully in 0:00:01
2019-12-12T11:45:45.0850209Z == clock drift check ==
2019-12-12T11:45:45.0873051Z   local time: Thu Dec 12 11:45:45 UTC 2019
2019-12-12T11:45:45.3743862Z   network time: Thu, 12 Dec 2019 11:45:45 GMT
2019-12-12T11:45:45.3743862Z   network time: Thu, 12 Dec 2019 11:45:45 GMT
2019-12-12T11:45:45.3748862Z == end clock drift check ==
2019-12-12T11:45:45.9505288Z 
2019-12-12T11:45:45.9567709Z ##[error]Bash exited with code '1'.
2019-12-12T11:45:45.9618766Z ##[section]Starting: Checkout
2019-12-12T11:45:45.9622404Z ==============================================================================
2019-12-12T11:45:45.9623404Z Task         : Get sources
2019-12-12T11:45:45.9623475Z 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)

@bors
Copy link
Contributor

bors commented Dec 12, 2019

💔 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 Dec 12, 2019
@matthewjasper
Copy link
Contributor

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

bors commented Dec 12, 2019

⌛ Testing commit bc9582a with merge e9469a6...

bors added a commit that referenced this pull request Dec 12, 2019
Remove the borrow check::nll submodule

NLL is the only borrow checker now, so no need to have a separate submodule.

@rustbot modify labels: +S-blocked

Waiting on #66815
@bors
Copy link
Contributor

bors commented Dec 12, 2019

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 12, 2019
@bors bors merged commit bc9582a into rust-lang:master Dec 12, 2019
@mark-i-m mark-i-m deleted the simplify-borrow_check-2 branch December 12, 2019 18:45
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.
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.
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.
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 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.
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.

6 participants