-
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 Vec visualization to understand capacity #79655
Conversation
The shown field order is does not match the implementation, which is exactly what I was asking for. So all is good. |
Yes but it may be confusing to read when most of the other parts have the same order. What is good is that we can explain that the order is not fixed which we did. |
I'm not sure the label Can you also address any questions/comments left on #76066? Specifically:
|
Oh, I didn't know about static.
Added. |
☔ The latest upstream changes (presumably #80530) made this pull request unmergeable. Please resolve the merge conflicts. |
Is there any other comments or maybe I should resolve it? |
Visualize vector while differentiating between stack and heap. Inspired by cheats.rs, as this is probably the first place beginner go, they could understand stack and heap, length and capacity with this. Not sure if adding this means we should add to other places too. Superseeds rust-lang#76066
Suggested by oli-obk
Ping, I fixed the conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
Looks good to me. One small comment:
Co-authored-by: Mara Bos <[email protected]>
@bors r+ rollup |
📌 Commit 9844d9e has been approved by |
Rollup of 11 pull requests Successful merges: - rust-lang#79655 (Add Vec visualization to understand capacity) - rust-lang#80172 (Use consistent punctuation for 'Prelude contents' docs) - rust-lang#80429 (Add regression test for mutual recursion in obligation forest) - rust-lang#80601 (Improve grammar in documentation of format strings) - rust-lang#81046 (Improve unknown external crate error) - rust-lang#81178 (Visit only terminators when removing landing pads) - rust-lang#81179 (Fix broken links with `--document-private-items` in the standard library) - rust-lang#81184 (Remove unnecessary `after_run` function) - rust-lang#81185 (Fix ICE in mir when evaluating SizeOf on unsized type) - rust-lang#81187 (Fix typo in counters.rs) - rust-lang#81219 (Document security implications of std::env::temp_dir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Visualize vector while differentiating between stack and heap.
Inspired by cheats.rs, as this is probably the first place beginner go,
they could understand stack and heap, length and capacity with this. Not
sure if adding this means we should add to other places too.
Superseeds #76066
r? @m-ou-se
cc @the8472 I put back the order of the fields as it feels weird, the note already explains that the order of fields is not guaranteed