Skip to content

TB: add Cell state to support more fine-grained tracking of interior mutable data #4273

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

yoctocell
Copy link

This adds a new Cell state to TB to represent shared references to interior mutable data. This is still a WIP for making the tracking of interior mutable data per-byte, like in Stacked Borrows.

cc @RalfJung @JoJoDeveloping

@RalfJung
Copy link
Member

Testing if this works:
r? @RalfJung

@RalfJung
Copy link
Member

Looks good, thanks. :) My comments are all minor.

@rustbot author

@rustbot rustbot added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Apr 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 17, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@yoctocell
Copy link
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Apr 23, 2025
@RalfJung
Copy link
Member

@rustbot author
Please post @rustbot ready when the PR is ready for the next round of review.

Also, why is this marked as "draft"? Since you were asking for a review, I assume this is ready to land, so please update the PR status accordingly. Usually "draft" means "not yet ready for review".

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Apr 28, 2025
@yoctocell yoctocell marked this pull request as ready for review April 28, 2025 19:15
@yoctocell
Copy link
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Apr 30, 2025
@RalfJung
Copy link
Member

This looks great, thanks! Please squash the commits, then we can land this. Please use the --keep-base flag when squashing so that the force-push diff is easier to review; do not rebase on the latest master branch. Then write @rustbot ready after you pushed the squashed PR.

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Waiting for a review to complete label Apr 30, 2025
@rustbot rustbot added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Apr 30, 2025
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@RalfJung
Copy link
Member

It seems like something went wrong with the rebase. Make sure you have the latest upstream commit fetched into your local clone.

@yoctocell
Copy link
Author

So you mean that I should run git pull on my master branch?

@RalfJung
Copy link
Member

RalfJung commented Apr 30, 2025

It depends on your setup. For me, it's git fetch origin, but you have to replace "origin" with whatever the name of the Miri upstream remote (https://github.com/rust-lang/miri, not your clone) is. Then I do git rebase origin/master --keep-base.

@yoctocell
Copy link
Author

Ok, now I have fetched the latest commit from the upstream remote. What would be the next step?

@RalfJung
Copy link
Member

RalfJung commented Apr 30, 2025

I have linked the tutorial for squashing above: https://rustc-dev-guide.rust-lang.org/git.html#squash-your-commits

@yoctocell
Copy link
Author

Running git rebase origin/master --keep-base outputs Current branch new-cell-state is up to date.. Is this expected?

@RalfJung
Copy link
Member

RalfJung commented Apr 30, 2025

Then your origin is out-of-date. Which URL is origin? What does git remote get-url origin say?

@yoctocell
Copy link
Author

yoctocell commented Apr 30, 2025

I get https://github.com/rust-lang/miri. Running git fetch origin doesn't do anything now, so seems to be the latest version.

@RalfJung
Copy link
Member

Hm that doesn't check out, your branch is not based on origin/master. Maybe try without --keep-base?

Or you can check git reflog for the commit ID before the broken rebase, to reset to a good state, and then try again.

@RalfJung
Copy link
Member

The commit ID before the broken rebase seems to be 64b11de, so the best fix is probably git reset --hard 64b11de958c114f6de837a25daec9ba8eda6d971, and then trying again.

@yoctocell
Copy link
Author

Doing git reset seemed to fix things :)

@RalfJung
Copy link
Member

RalfJung commented May 1, 2025

Great. :)

@RalfJung RalfJung enabled auto-merge May 1, 2025 09:51
@RalfJung RalfJung added this pull request to the merge queue May 1, 2025
Merged via the queue into rust-lang:master with commit b9aa782 May 1, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: Waiting for the PR author to address review comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants