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] for some function in core::mem. #86664

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jun 27, 2021

These functions can panic for some types. This makes the panic point to the code that calls e.g. mem::uninitialized(), instead of inside the definition of mem::uninitialized.

@m-ou-se m-ou-se added T-libs Relevant to the library team, which will review and decide on the PR/issue. A-raw-pointers Area: raw pointers, MaybeUninit, NonNull labels Jun 27, 2021
@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(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 Jun 27, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 12, 2021
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Feel free to r=me if this doesn't need a full t-libs-api member's review.

@m-ou-se m-ou-se assigned JohnTitor and unassigned joshtriplett Jul 24, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jul 24, 2021

Thanks for the review!

@bors r=JohnTitor

@bors
Copy link
Contributor

bors commented Jul 24, 2021

📌 Commit b490dbdeb427d4c54984085cf18c7dfd87f1dd6f has been approved by JohnTitor

@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 Jul 24, 2021
@bors
Copy link
Contributor

bors commented Jul 24, 2021

⌛ Testing commit b490dbdeb427d4c54984085cf18c7dfd87f1dd6f with merge a3d54864adfb5b8d713f9546460c80f2eccaa0a3...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jul 24, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 24, 2021
@JohnTitor JohnTitor added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2021
These functions can panic for some types. This makes the panic point to
the code that calls e.g. mem::uninitialized(), instead of inside the
definition of mem::uninitialized.
@m-ou-se m-ou-se force-pushed the uninit-track-caller branch from b490dbd to 3f6dc9a Compare July 28, 2021 12:35
@m-ou-se
Copy link
Member Author

m-ou-se commented Jul 28, 2021

Rebased and blessed the test output.

@bors r=JohnTitor

@bors
Copy link
Contributor

bors commented Jul 28, 2021

📌 Commit 3f6dc9a has been approved by JohnTitor

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 28, 2021
@bors
Copy link
Contributor

bors commented Jul 29, 2021

⌛ Testing commit 3f6dc9a with merge 34e37bdbb491451aa684976d765796616b217443...

@bors
Copy link
Contributor

bors commented Jul 29, 2021

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 29, 2021
@JohnTitor
Copy link
Member

@bors retry

@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 Jul 29, 2021
@bors
Copy link
Contributor

bors commented Jul 29, 2021

⌛ Testing commit 3f6dc9a with merge 5fb3394...

@bors
Copy link
Contributor

bors commented Jul 29, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 5fb3394 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 29, 2021
@bors bors merged commit 5fb3394 into rust-lang:master Jul 29, 2021
@rustbot rustbot added this to the 1.56.0 milestone Jul 29, 2021
@m-ou-se m-ou-se deleted the uninit-track-caller branch July 29, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-raw-pointers Area: raw pointers, MaybeUninit, NonNull merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants