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

Add track_caller to RefCell::{borrow, borrow_mut} #74526

Merged
merged 1 commit into from Aug 3, 2020

Conversation

erikdesjardins
Copy link
Contributor

So panic messages point at the offending borrow.

Fixes #74472

@rust-highfive
Copy link
Collaborator

r? @sfackler

(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 Jul 19, 2020
@bors
Copy link
Contributor

bors commented Jul 28, 2020

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

So panic messages point at the offending borrow.
@Mark-Simulacrum
Copy link
Member

Seems like a clear win. I don't think this is observable beyond the panic message being (much) better.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 3, 2020

📌 Commit c596e01 has been approved by Mark-Simulacrum

@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 Aug 3, 2020
@bors
Copy link
Contributor

bors commented Aug 3, 2020

⌛ Testing commit c596e01 with merge d8cbd9c...

@bors
Copy link
Contributor

bors commented Aug 3, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing d8cbd9c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 3, 2020
@bors bors merged commit d8cbd9c into rust-lang:master Aug 3, 2020
@erikdesjardins erikdesjardins deleted the reftrack branch August 3, 2020 23:38
est31 added a commit to est31/rust that referenced this pull request Sep 22, 2020
Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info is only available on non-Windows platforms.
@Mark-Simulacrum Mark-Simulacrum added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 22, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 22, 2020
…ulacrum

Add #[track_caller] to more panicking Cell functions

Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info in debuginfo is only available on non-Windows platforms.
ecstatic-morse added a commit to ecstatic-morse/rust that referenced this pull request Sep 22, 2020
…ulacrum

Add #[track_caller] to more panicking Cell functions

Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info in debuginfo is only available on non-Windows platforms.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 23, 2020
…ulacrum

Add #[track_caller] to more panicking Cell functions

Continuation of rust-lang#74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info in debuginfo is only available on non-Windows platforms.
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. relnotes Marks issues that should be documented in the release notes of the next release. 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.

Better runtime panic message for RefCell borrow
5 participants