-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Rollup of 6 pull requests #146825
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
Closed
Closed
Rollup of 6 pull requests #146825
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `cargo asm` tool pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient
Improve doc of some methods that take ranges Some methods that were taking some range in parameter were a bit inconsistent / unclear in the panic documentation. Here is the recap: - Replaced "start/end point" by "start/end bound" to be coherent with [`RangeBounds`](https://doc.rust-lang.org/stable/std/ops/trait.RangeBounds.html) naming (it's also easier to understand I think) - Previously, it was written "_[...] or if the end point is greater than the length of [...]_", but this is not entirely true! Actually, you can have a start bound that is greater than the length, with an end bound that is unbounded and it will also panic. Therefore I think that "_[...] one of the range bound is bounded and greater than the length of [...]_" is better! - `String` methods weren't mentionning that the method panics if `start_bound > end_bound` but it actually does! It uses `slice::range` which panics when `start > end`. (https://doc.rust-lang.org/stable/src/alloc/string.rs.html#1932-1934, https://doc.rust-lang.org/stable/src/core/slice/index.rs.html#835-837). You can also test it with: ```rs struct MyRange; impl std::ops::RangeBounds<usize> for MyRange { fn start_bound(&self) -> std::ops::Bound<&usize> { std::ops::Bound::Included(&3usize) } fn end_bound(&self) -> std::ops::Bound<&usize> { std::ops::Bound::Included(&1usize) } } fn main() { let mut s = String::from("I love Rust!"); s.drain(MyRange); // panics! } ```
…r=Mark-Simulacrum Stabilize `new_zeroed_alloc` The corresponding `new_uninit` and `new_uninit_slice` functions were stabilized in rust-lang#129401, but the zeroed counterparts were left for later out of a [desire](rust-lang#63291 (comment)) to stabilize only the minimal set. These functions are straightforward mirrors of the uninit functions and well-established. Since no blockers or design questions have surfaced in the past year, I think it's time to stabilize them. Tracking issue: rust-lang#129396
…k-Simulacrum Stabilize `std::panic::Location::file_as_c_str` Closes: rust-lang#141727 Nominating this for T-lang as per ``@traviscross`` rust-lang#141727 (comment)
…=cjgillot Deref related cleanups in ref_prop Cherry picked from rust-lang#146710 r? cjgillot
…manieu naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? ``@Amanieu``
Fix old typo in lang_start_internal comment Noticed this when reading the rt cleanup code; the typo was introduced during a mass port of libstd to std in comments.
@bors r+ rollup=never p=5 |
bors
added a commit
that referenced
this pull request
Sep 20, 2025
Rollup of 6 pull requests Successful merges: - #140983 (Improve doc of some methods that take ranges) - #144091 (Stabilize `new_zeroed_alloc`) - #145664 (Stabilize `std::panic::Location::file_as_c_str`) - #146744 (Deref related cleanups in ref_prop) - #146793 (naked_asm: emit a label starting with `func_end`) - #146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry timeout in rustdoc tests |
bors
added a commit
that referenced
this pull request
Sep 21, 2025
Rollup of 6 pull requests Successful merges: - #140983 (Improve doc of some methods that take ranges) - #144091 (Stabilize `new_zeroed_alloc`) - #145664 (Stabilize `std::panic::Location::file_as_c_str`) - #146744 (Deref related cleanups in ref_prop) - #146793 (naked_asm: emit a label starting with `func_end`) - #146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
Looks like a runner flaked out. I'm going to close this and make a larger rollup. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
new_zeroed_alloc
#144091 (Stabilizenew_zeroed_alloc
)std::panic::Location::file_as_c_str
#145664 (Stabilizestd::panic::Location::file_as_c_str
)func_end
#146793 (naked_asm: emit a label starting withfunc_end
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup