-
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
Tracking issue for PathBuf capacity methods #58234
Comments
Happy to take this on as a first contribution to rust. |
This comment has been minimized.
This comment has been minimized.
@Mark-Simulacrum are you able to define a list of the methods that need to be implemented as part of this PR? |
I think all of these will essentially call the underlying functions on
We'll probably want to add all of these under the same feature gate. |
@Mark-Simulacrum thanks for that. I have the implementation drafted locally. I'm having some difficulty however in running the tests for stdlib - even a |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…acrum Add alias methods to PathBuf for underlying OsString (rust-lang#58234) Implemented the following methods on PathBuf which forward to the underlying OsString. - capacity - with_capacity - clear - reserve - reserve_exact - shrink_to_fit - shrink_to These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice. Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods. (This PR addresses issue rust-lang#58234)
…acrum Add alias methods to PathBuf for underlying OsString (rust-lang#58234) Implemented the following methods on PathBuf which forward to the underlying OsString. - capacity - with_capacity - clear - reserve - reserve_exact - shrink_to_fit - shrink_to These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice. Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods. (This PR addresses issue rust-lang#58234)
…acrum Add alias methods to PathBuf for underlying OsString (rust-lang#58234) Implemented the following methods on PathBuf which forward to the underlying OsString. - capacity - with_capacity - clear - reserve - reserve_exact - shrink_to_fit - shrink_to These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice. Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods. (This PR addresses issue rust-lang#58234)
Rollup of 24 pull requests Successful merges: - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s) - #58044 (Make overflowing and wrapping negation const) - #58303 (Improve stability tags display) - #58336 (Fix search results interactions) - #58384 (Fix tables display) - #58392 (Use less explicit shifting in std::net::ip) - #58409 (rustdoc: respect alternate flag when formatting impl trait) - #58456 (Remove no longer accurate diagnostic code about NLL) - #58528 (Don't use an allocation for ItemId in StmtKind) - #58530 (Monomorphize less code in fs::{read|write}) - #58534 (Mention capping forbid lints) - #58536 (Remove UB in pointer tests) - #58538 (Add missing fmt structs examples) - #58539 (Add alias methods to PathBuf for underlying OsString (#58234)) - #58544 (Fix doc for rustc "-g" flag) - #58545 (Add regression test for a specialization-related ICE (#39448)) - #58546 (librustc_codegen_llvm => 2018) - #58551 (Explain a panic in test case net::tcp::tests::double_bind) - #58553 (Use more impl header lifetime elision) - #58562 (Fix style nits) - #58565 (Fix typo in std::future::Future docs) - #58568 (Fix a transposition in driver.rs.) - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`) - #58576 (Stabilize iter::successors and iter::from_fn)
Rollup of 24 pull requests Successful merges: - #56470 (Modify doctest's auto-`fn main()` to allow `Result`s) - #58044 (Make overflowing and wrapping negation const) - #58303 (Improve stability tags display) - #58336 (Fix search results interactions) - #58384 (Fix tables display) - #58392 (Use less explicit shifting in std::net::ip) - #58409 (rustdoc: respect alternate flag when formatting impl trait) - #58456 (Remove no longer accurate diagnostic code about NLL) - #58528 (Don't use an allocation for ItemId in StmtKind) - #58530 (Monomorphize less code in fs::{read|write}) - #58534 (Mention capping forbid lints) - #58536 (Remove UB in pointer tests) - #58538 (Add missing fmt structs examples) - #58539 (Add alias methods to PathBuf for underlying OsString (#58234)) - #58544 (Fix doc for rustc "-g" flag) - #58545 (Add regression test for a specialization-related ICE (#39448)) - #58546 (librustc_codegen_llvm => 2018) - #58551 (Explain a panic in test case net::tcp::tests::double_bind) - #58553 (Use more impl header lifetime elision) - #58562 (Fix style nits) - #58565 (Fix typo in std::future::Future docs) - #58568 (Fix a transposition in driver.rs.) - #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`) - #58576 (Stabilize iter::successors and iter::from_fn)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reviewing this since then, I think it may be worth removing these APIs and replacing them with something like |
I'd love to see these stabilized. I have a tool that manipulates lots of paths, so I'd like to avoid needless reallocations.
|
@rfcbot merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
I've posted a stabilization PR in #71328. |
…apacity, r=sfackler Stabilize PathBuf capacity methods Closes rust-lang#58234. Stabilization FCP finished in rust-lang#58234 (comment).
…apacity, r=sfackler Stabilize PathBuf capacity methods Closes rust-lang#58234. Stabilization FCP finished in rust-lang#58234 (comment).
…apacity, r=sfackler Stabilize PathBuf capacity methods Closes rust-lang#58234. Stabilization FCP finished in rust-lang#58234 (comment).
capacity
with_capacity
clear
reserve
reserve_exact
shrink_to_fit
shrink_to
, should probably not be stabilized beforeOsString::shrink_to
, see Tracking issue forshrink_to
feature #56431The text was updated successfully, but these errors were encountered: