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

Rest In Peace, AST borrowck (2012-2019) #64790

Merged
merged 10 commits into from Sep 28, 2019

Conversation

@Centril
Copy link
Member

commented Sep 25, 2019

After having served us for 7 years, the AST borrow-checker is no more.

This PR starts from the commit rm -rf librustc_ast_borrowck, building on #64221, and is probably best read commit by commit.

Migrate mode is not removed yet as it may be useful for NLL => polonius and it is also used for the mutable_borrow_reservation_conflict issue (#59159).

r? @matthewjasper


ast-borrowck-rip

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Sep 26, 2019

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

Click to expand the log.
2019-09-25T23:35:53.4466112Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-25T23:35:53.4707858Z ##[command]git config gc.auto 0
2019-09-25T23:35:53.4758198Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-25T23:35:53.4815685Z ##[command]git config --get-all http.proxy
2019-09-25T23:35:53.4966176Z ##[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/64790/merge:refs/remotes/pull/64790/merge
---
2019-09-26T00:24:03.9841780Z == clock drift check ==
2019-09-26T00:24:03.9859645Z   local time: Thu Sep 26 00:24:03 UTC 2019
2019-09-26T00:24:04.0401149Z   network time: Thu, 26 Sep 2019 00:24:04 GMT
2019-09-26T00:24:04.0404600Z == end clock drift check ==
2019-09-26T00:24:07.1678341Z ##[error]Bash exited with code '1'.
2019-09-26T00:24:07.1722661Z ##[section]Starting: Checkout
2019-09-26T00:24:07.1724900Z ==============================================================================
2019-09-26T00:24:07.1724949Z Task         : Get sources
2019-09-26T00:24:07.1725157Z 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)

@lqd

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2019

You've checked our borrows well, since April 26/27 2012
So long, and thanks for all the compile errors.

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Sep 26, 2019

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

@jhpratt

This comment has been minimized.

Copy link

commented Sep 26, 2019

As someone who is not terribly familiar with the compiler internals, are there any practical implications of this change?

@Centril

This comment has been minimized.

Copy link
Member Author

commented Sep 26, 2019

@jhpratt My understanding is that it will allow us to do cleanups in more places, e.g. with respect to rvalue-promotion and whatnot and that might make us more nimble in terms of improvements.

For end-users there should be no change other than closing some soundness holes but that is done first as a part of #64221 which this PR depends on.

@Centril Centril force-pushed the Centril:rip-ast-borrowck branch from 1d0c0b4 to 1192d76 Sep 27, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

commented Sep 27, 2019

Rebased (#64221 landed). Should be ready to go now. :)

Copy link
Contributor

left a comment

r=me with comment addressed

src/librustc_driver/pretty.rs Show resolved Hide resolved
@Centril

This comment has been minimized.

Copy link
Member Author

commented Sep 27, 2019

@bors r=matthewjasper p=3 rollup=never

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2019

📌 Commit d3d5fe7 has been approved by matthewjasper

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Sep 27, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rip-ast-borrowck (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rip-ast-borrowck --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustc_mir/hair/pattern/check_match.rs
CONFLICT (content): Merge conflict in src/librustc_mir/hair/pattern/check_match.rs
Auto-merging src/librustc_mir/borrow_check/mutability_errors.rs
Auto-merging src/librustc_mir/borrow_check/mod.rs
Removing src/librustc_ast_borrowck/lib.rs
Removing src/librustc_ast_borrowck/graphviz.rs
Removing src/librustc_ast_borrowck/dataflow.rs
Removing src/librustc_ast_borrowck/cfg/mod.rs
Removing src/librustc_ast_borrowck/cfg/graphviz.rs
CONFLICT (modify/delete): src/librustc_ast_borrowck/cfg/construct.rs deleted in heads/homu-tmp and modified in HEAD. Version HEAD of src/librustc_ast_borrowck/cfg/construct.rs left in tree.
Removing src/librustc_ast_borrowck/borrowck/move_data.rs
CONFLICT (modify/delete): src/librustc_ast_borrowck/borrowck/mod.rs deleted in heads/homu-tmp and modified in HEAD. Version HEAD of src/librustc_ast_borrowck/borrowck/mod.rs left in tree.
Removing src/librustc_ast_borrowck/borrowck/gather_loans/restrictions.rs
Removing src/librustc_ast_borrowck/borrowck/gather_loans/mod.rs
Removing src/librustc_ast_borrowck/borrowck/gather_loans/lifetime.rs
Removing src/librustc_ast_borrowck/borrowck/gather_loans/gather_moves.rs
CONFLICT (modify/delete): src/librustc_ast_borrowck/borrowck/check_loans.rs deleted in heads/homu-tmp and modified in HEAD. Version HEAD of src/librustc_ast_borrowck/borrowck/check_loans.rs left in tree.
Removing src/librustc_ast_borrowck/borrowck/README.md
Removing src/librustc_ast_borrowck/Cargo.toml
Auto-merging src/librustc/ty/context.rs
Auto-merging src/librustc/session/config.rs
Removing src/librustc/middle/borrowck.rs
Auto-merging src/librustc/hir/mod.rs
CONFLICT (content): Merge conflict in src/librustc/hir/mod.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors

This comment was marked as resolved.

Copy link
Contributor

commented Sep 27, 2019

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

@mark-i-m

This comment has been minimized.

Copy link
Member

commented Sep 27, 2019

Many, many congratulations to those who have worked towards this milestone 🎉🎉🎉

@Centril Centril force-pushed the Centril:rip-ast-borrowck branch from d3d5fe7 to 001357f Sep 27, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

commented Sep 27, 2019

@bors r=matthewjasper p=3 rollup=never

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2019

📌 Commit 001357f has been approved by matthewjasper

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2019

⌛️ Testing commit 001357f with merge c6f87c2...

bors added a commit that referenced this pull request Sep 27, 2019
Rest In Peace, AST borrowck (2012-2019)

After having served us for 7 years, the AST borrow-checker is no more.

This PR starts from the commit `rm -rf librustc_ast_borrowck`, building on #64221, and is probably best read commit by commit.

Migrate mode is not removed yet as it may be useful for NLL => polonius and it is also used for the `mutable_borrow_reservation_conflict` issue (#59159).

r? @matthewjasper

------------------------

![ast-borrowck-rip](https://user-images.githubusercontent.com/855702/65646791-91a87600-dffc-11e9-9814-deed6b821c80.png)
@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2019

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

@bors bors added the merged-by-bors label Sep 28, 2019
@bors bors merged commit 001357f into rust-lang:master Sep 28, 2019
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20190927.44 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@Centril Centril deleted the Centril:rip-ast-borrowck branch Sep 28, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

commented Sep 28, 2019

🎉 🍾 🎈 Score! 🎈 🍾 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.