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

Fix safety comment #80774

Merged
merged 1 commit into from
Jan 10, 2021
Merged

Fix safety comment #80774

merged 1 commit into from
Jan 10, 2021

Conversation

LingMan
Copy link
Contributor

@LingMan LingMan commented Jan 7, 2021

The size assertion in the comment was inverted compared to the code. After fixing that the implication that (new_size >= old_size) => new_size != 0 still doesn't hold so explain why old_size != 0 at this point.

The size assertion in the comment was inverted compared to the code. After fixing that the implication that `(new_size >= old_size) => new_size != 0` still doesn't hold so explain why `old_size != 0` at this point.
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(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 Jan 7, 2021
@nagisa
Copy link
Member

nagisa commented Jan 8, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 8, 2021

📌 Commit 769fb8a has been approved by nagisa

@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 Jan 8, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 10, 2021
Fix safety comment

The size assertion in the comment was inverted compared to the code. After fixing that the implication that `(new_size >= old_size) => new_size != 0` still doesn't hold so explain why `old_size != 0` at this point.
This was referenced Jan 10, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 10, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#79502 (Implement From<char> for u64 and u128.)
 - rust-lang#79968 (Improve core::ptr::drop_in_place debuginfo)
 - rust-lang#80774 (Fix safety comment)
 - rust-lang#80801 (Use correct span for structured suggestion)
 - rust-lang#80803 (Remove useless `fill_in` function)
 - rust-lang#80820 (Support `download-ci-llvm` on NixOS)
 - rust-lang#80825 (Remove under-used ImplPolarity enum)
 - rust-lang#80850 (Allow #[rustc_builtin_macro = "name"])
 - rust-lang#80857 (Add comment to `Vec::truncate` explaining `>` vs `>=`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d64356f into rust-lang:master Jan 10, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 10, 2021
@LingMan LingMan deleted the patch-1 branch January 10, 2021 10:55
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.

6 participants