-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #73265) made this pull request unmergeable. Please resolve the merge conflicts. |
So panic messages point at the offending borrow.
Seems like a clear win. I don't think this is observable beyond the panic message being (much) better. @bors r+ |
📌 Commit c596e01 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
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.
…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.
…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.
…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.
So panic messages point at the offending borrow.
Fixes #74472