Repository navigation
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @mejrs (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
|
Hi @nia-e , As an Outreachy Internship applicant and a first-time contributor working on Allocators 1.0 test coverage. |
|
Hello, congrats on your first PR! I wanted to leave a few notes.
The PR says: "Verified feature gate handling (#![feature(clone_from_ref)])". This is misleading. It doesn't verify the gate. To check it you'd need a test without the feature gate added. I think testing this is unnecessary here. Afaict, testing edge cases would provide better coverage. |
|
r? @nia-e |
|
|
Thanks @malezjaa for the clear feedback! I'll move the test logic into alloctests and rework it to focus on edge cases instead of overlapping with existing doctests.. This is for my Outreachy Contribution Stage. |
This comment has been minimized.
This comment has been minimized.
Hi @malezjaa , Thank you for the helpful feedback and the warm welcome! I’ve moved the test to |
This comment has been minimized.
This comment has been minimized.
c11d302 to
8a06c6a
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
lgtm :) thanks for contributing! @bors rollup |
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
…Arc, Rc) * alloc: Add test coverage for try_clone_from_ref_in * alloc: test cloning zero-sized values from references * alloc: format zero-sized clone test * alloctests: remove obsolete const_btree_len feature * alloctests: fix feature attribute formatting
|
🔨 5 commits were squashed into 0376ed9. |
9e93560 to
0376ed9
Compare
|
@bors r+ |
…in, r=nia-e [Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc) Description: LLM Disclosure: I used an AI assistant for local guidance while exploring the test structure and troubleshooting compiler errors (such as handling System allocator equality checks). I wrote this PR description, ran all tests, and verified the changes myself. **Summary** I added a UI test to verify `try_clone_from_ref_in ` across **Box, Arc, and Rc** using the System allocator as part of the Allocators 1.0 test coverage work. What’s included: - Added tests/ui/allocator/try-clone-from-ref-in.rs - Tested fallible cloning from references for **&str** and **&[i32]** slices with Box, **Arc,** and **Rc** - Verified feature gate handling (#![feature(clone_from_ref)]) - Ran `./x.py test tests/ui/allocator/try-clone-from-ref-in.rs` locally and the test passed.
Rollup of 9 pull requests Successful merges: - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros) - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs) - #165268 (Fix constant-pattern equality suggestion spans in macros) - #165318 (Fix explicit destructor-call suggestion spans in macros) - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc)) - #165001 (Document allocator swap in BinaryHeap::append) - #165330 (Impl read_le/read_be for f16 and f128) - #165414 (Remove unusued query key impl) - #165440 (docker: bump node to v24.22.2 in shared script)
Rollup of 9 pull requests Successful merges: - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros) - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs) - #165268 (Fix constant-pattern equality suggestion spans in macros) - #165318 (Fix explicit destructor-call suggestion spans in macros) - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc)) - #165001 (Document allocator swap in BinaryHeap::append) - #165330 (Impl read_le/read_be for f16 and f128) - #165414 (Remove unusued query key impl) - #165440 (docker: bump node to v24.22.2 in shared script)
Rollup of 9 pull requests Successful merges: - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros) - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs) - #165268 (Fix constant-pattern equality suggestion spans in macros) - #165318 (Fix explicit destructor-call suggestion spans in macros) - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc)) - #165001 (Document allocator swap in BinaryHeap::append) - #165330 (Impl read_le/read_be for f16 and f128) - #165414 (Remove unusued query key impl) - #165440 (docker: bump node to v24.22.2 in shared script)
Description:
LLM Disclosure: I used an AI assistant for local guidance while exploring the test structure and troubleshooting compiler errors (such as handling System allocator equality checks). I wrote this PR description, ran all tests, and verified the changes myself.
Summary
I added a UI test to verify
try_clone_from_ref_inacross Box, Arc, and Rc using the System allocator as part of the Allocators 1.0 test coverage work.What’s included:
Added tests/ui/allocator/try-clone-from-ref-in.rs
Tested fallible cloning from references for &str and &[i32] slices with Box, Arc, and Rc
Verified feature gate handling (#![feature(clone_from_ref)])
Ran
./x.py test tests/ui/allocator/try-clone-from-ref-in.rslocally and the test passed.