Skip to content

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Jun 22, 2025

Implementation of rust-lang/libs-team#367.

This mainly adds BorrowedCursor::with_unfilled_buf, with enables using the unfilled part of a cursor as a BorrowedBuf.

Note that unlike the ACP, BorrowedCursor::unfilled_buf was moved to a From conversion. This is more consistent with other ways of creating a BorrowedBuf and hides a bit this conversion that requires unsafe code to be used correctly.

Cc #78485 #117693

@rustbot
Copy link
Collaborator

rustbot commented Jun 22, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 22, 2025
Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using
the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a
`From` conversion. This is more consistent with other ways of creating a
`BorrowedBuf` and hides a bit this conversion that requires unsafe code
to be used correctly.
@a1phyr a1phyr force-pushed the borrowed_cursor_to_buf branch from 1b4a047 to 136d24f Compare July 1, 2025 12:06
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 13, 2025

📌 Commit 136d24f has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Jul 13, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 13, 2025
…ark-Simulacrum

core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang#78485 rust-lang#117693
bors added a commit that referenced this pull request Jul 13, 2025
Rollup of 8 pull requests

Successful merges:

 - #142885 (core: Add `BorrowedCursor::with_unfilled_buf`)
 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143355 (wrapping shift: remove first bitmask and table)
 - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`)
 - #143724 (Tidy cleanup)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143880 (tests: Test line debuginfo for linebreaked function parameters)

Failed merges:

 - #143630 (Drop `./x suggest`)
 - #143733 (Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request Jul 14, 2025
…ark-Simulacrum

core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang#78485 rust-lang#117693
bors added a commit that referenced this pull request Jul 14, 2025
Rollup of 16 pull requests

Successful merges:

 - #142885 (core: Add `BorrowedCursor::with_unfilled_buf`)
 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143355 (wrapping shift: remove first bitmask and table)
 - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`)
 - #143592 (UWP: link ntdll functions using raw-dylib)
 - #143681 (bootstrap/miri: avoid rebuilds for test builds)
 - #143710 (Updates to random number generation APIs)
 - #143724 (Tidy cleanup)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
 - #143868 (warn on align on fields to avoid breaking changes)
 - #143875 (update issue number for `const_trait_impl`)
 - #143881 (Use zero for initialized Once state)
 - #143887 (Run bootstrap tests sooner in the `x test` pipeline)
 - #143893 (Don't require `eh_personality` lang item on targets that have a personality)

Failed merges:

 - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
 - #143891 (Port `#[coverage]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 14, 2025
…ark-Simulacrum

core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang#78485 rust-lang#117693
bors added a commit that referenced this pull request Jul 14, 2025
Rollup of 17 pull requests

Successful merges:

 - #142885 (core: Add `BorrowedCursor::with_unfilled_buf`)
 - #143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
 - #143355 (wrapping shift: remove first bitmask and table)
 - #143448 (remote-test-client: Exit code `128 + <signal-number>` instead of `3`)
 - #143681 (bootstrap/miri: avoid rebuilds for test builds)
 - #143710 (Updates to random number generation APIs)
 - #143724 (Tidy cleanup)
 - #143738 (Move several float tests to floats/mod.rs)
 - #143820 (Fixed a core crate compilation failure when enabling the `optimize_for_size` feature on some targets)
 - #143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
 - #143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
 - #143868 (warn on align on fields to avoid breaking changes)
 - #143875 (update issue number for `const_trait_impl`)
 - #143881 (Use zero for initialized Once state)
 - #143887 (Run bootstrap tests sooner in the `x test` pipeline)
 - #143893 (Don't require `eh_personality` lang item on targets that have a personality)
 - #143901 (Region constraint nits)

Failed merges:

 - #143878 (Port `#[pointee]` to the new attribute parsing infrastructure)
 - #143891 (Port `#[coverage]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Jul 14, 2025

⌛ Testing commit 136d24f with merge 7f2065a...

@bors
Copy link
Collaborator

bors commented Jul 15, 2025

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 7f2065a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 15, 2025
@bors bors merged commit 7f2065a into rust-lang:master Jul 15, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 15, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing a001497 (parent) -> 7f2065a (this PR)

Test differences

Show 5 test diffs

Stage 1

  • io::borrowed_buf::cursor_with_unfilled_buf: [missing] -> pass (J0)

Additionally, 4 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 7f2065a4bae1faed5bab928c670964eafbf43b55 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-linux: 6071.9s -> 8199.1s (35.0%)
  2. x86_64-apple-1: 7490.2s -> 10077.7s (34.5%)
  3. aarch64-apple: 4936.8s -> 3820.7s (-22.6%)
  4. dist-apple-various: 9048.0s -> 7510.5s (-17.0%)
  5. dist-x86_64-apple: 10317.8s -> 9030.2s (-12.5%)
  6. x86_64-gnu-llvm-20-1: 3702.2s -> 3286.7s (-11.2%)
  7. x86_64-msvc-ext1: 7581.1s -> 6901.4s (-9.0%)
  8. x86_64-apple-2: 5015.3s -> 4612.8s (-8.0%)
  9. x86_64-msvc-1: 8616.6s -> 9232.2s (7.1%)
  10. x86_64-mingw-2: 7527.7s -> 7000.3s (-7.0%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7f2065a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-3.6%, -1.2%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-3.6%, -1.2%] 3

Cycles

Results (secondary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 464.247s -> 463.94s (-0.07%)
Artifact size: 374.71 MiB -> 374.74 MiB (0.01%)

Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
…k-Simulacrum

core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang#78485 rust-lang#117693
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 29, 2025
…k-Simulacrum

core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of rust-lang/libs-team#367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang#78485 rust-lang#117693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants