Skip to content

test: Add asserts to catch BorrowMutError's - #13650

Closed
epage wants to merge 1 commit into
rust-lang:masterfrom
epage:borrow_mut1
Closed

epage wants to merge 1 commit into
rust-lang:masterfrom
epage:borrow_mut1

Conversation

@epage

@epage epage commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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

rustbot commented Mar 26, 2024

Copy link
Copy Markdown
Collaborator

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

epage commented Mar 26, 2024

Copy link
Copy Markdown
Contributor Author

Nope, still hitting it.

@weihanglo

Copy link
Copy Markdown
Member

That git commit is broken and got cached?

This amends the commit and seems work: #13651

@weihanglo

Copy link
Copy Markdown
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.

4 participants