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

test: Add asserts to catch BorrowMutError's #13650

Closed
wants to merge 1 commit into from

Conversation

epage
Copy link
Contributor

@epage epage commented Mar 26, 2024

What does this PR try to resolve?

This intentionally borrows from RefCells before conditional code to try to prevent regressions like #13646 without exhaustively covering every case that could hit these BorrowMutErrors with complicated tests.

How should we test and review this PR?

I tested this by ensuring the registry code path panicked before rebasing on top of #13647.
Once I rebased, the panic went away.

Additional information

Split off from #13649 to try to avoid appveyor

This intentionally borrows from `RefCell`s before conditional code
to try to prevent regressions like rust-lang#13646 without exhaustively
covering every case that could hit these `BorrowMutError`s with
complicated tests.

I tested this by ensuring the registry code path panicked before
rebasing on top of rust-lang#13647.
Once I rebased, the panic went away.
@rustbot
Copy link
Collaborator

rustbot commented Mar 26, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-filesystem Area: issues with filesystems A-registries Area: registries S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 26, 2024
@epage
Copy link
Contributor Author

epage commented Mar 26, 2024

Nope, still hitting it.

@weihanglo
Copy link
Member

That git commit is broken and got cached?

This amends the commit and seems work: #13651

@weihanglo
Copy link
Member

Close in favor of #13651.

@weihanglo weihanglo closed this Mar 26, 2024
@epage epage deleted the borrow_mut1 branch March 26, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-filesystem Area: issues with filesystems A-registries Area: registries S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants