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 comments around code where ordering is important due for panic-safety #86521

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Jun 21, 2021

Iterators contain arbitrary code which may panic. Unsafe code has to be
careful to do its state updates at the right point between calls that may panic.

As requested in #86452 (comment)

r? @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2021
…fety

Iterators contain arbitrary code which may panic. Unsafe code has to be
careful to do its state updates at the right point between calls
that may panic.
@RalfJung
Copy link
Member

Thanks a lot. :) I can't actually judge this is the context of the surrounding code, but it all seems reasonable and I trust you know that code way better than I do. :)
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 22, 2021

📌 Commit e0d7015 has been approved by RalfJung

@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 Jun 22, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 22, 2021
Rollup of 6 pull requests

Successful merges:

 - rust-lang#86223 (Specify the kind of the item for E0121)
 - rust-lang#86521 (Add comments around code where ordering is important due for panic-safety)
 - rust-lang#86523 (Improvements to intra-doc link macro disambiguators)
 - rust-lang#86542 (Line numbers aligned with content)
 - rust-lang#86549 (Add destructuring example of E0508)
 - rust-lang#86557 (Update books)

Failed merges:

 - rust-lang#86548 (Fix crate filter search reset)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6023ac2 into rust-lang:master Jun 23, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants