Skip to content

Rename bstr module/feature to byte_str - #160912

Open
clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:byte-str-module
Open

Rename bstr module/feature to byte_str#160912
clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:byte-str-module

Conversation

@clarfonthey

Copy link
Copy Markdown
Contributor

This also renames the various features to use byte_str instead of bstr.

@rustbot rustbot added O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows labels Aug 11, 2026
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, nia-e

@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 Aug 11, 2026
@clarfonthey clarfonthey removed O-windows Operating system: Windows O-unix Operating system: Unix-like O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) labels Aug 11, 2026
@rustbot rustbot added O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows labels Aug 11, 2026
@rustbot

This comment has been minimized.

@clarfonthey
clarfonthey force-pushed the byte-str-module branch 2 times, most recently from 78405db to 5adccc5 Compare August 11, 2026 14:20
@clarfonthey clarfonthey changed the title Rename bstr module to byte_str Rename bstr module/feature to byte_str Aug 11, 2026
@rust-log-analyzer

This comment has been minimized.

@theemathas

Copy link
Copy Markdown
Contributor

Can we also have a doc alias or something, so when someone searches for bstr (like the crate name), they also find this?

@clarfonthey

clarfonthey commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for reminding me; I'll add those to the types and the module.

EDIT: The types already have it, so, just the module, then.

@clarfonthey
clarfonthey force-pushed the byte-str-module branch 2 times, most recently from 1d7938e to 3c4fe83 Compare August 11, 2026 17:21
@rust-log-analyzer

This comment has been minimized.

@clarfonthey

Copy link
Copy Markdown
Contributor Author

Yeah, okay, since the types have this, adding it to the modules is just extra noise:

module bstr - see std::byte_str, struct BStr - see std::byte_str::ByteStr, module bstr - see alloc::byte_str, module bstr - see core::byte_str, struct BString - see std::byte_str::ByteString

@clarfonthey

Copy link
Copy Markdown
Contributor Author

Note: the rustdoc links are annoying, but I'll finagle a fix for them.

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

I assume there's a "why" somewhere for this, can you expand the PR description to include it? The actual code changes seem fine (I guess modulo CI failure :)

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 16, 2026
@rust-bors

This comment has been minimized.

@clarfonthey

Copy link
Copy Markdown
Contributor Author

Gonna just nominate this so we can discuss this change. I think it's uncontroversial, but worth talking about.

@rustbot label:I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 25, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor Author

Discussion in the meeting was that it should be consistent, but before stabilisation we might rename it to bstr::BStr if people want that API instead.

For now, byte_str::ByteStr makes the most sense.

(To be clear, bstr::ByteStr and byte_str::BStr are both undesired.)

@clarfonthey clarfonthey removed the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 25, 2026
@rustbot

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

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.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.103
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
core/byte_str/struct.ByteStr.html:53: broken link fragment `#method.to_ascii_uppercase` pointing to `core/byte_str/struct.ByteStr.html`
core/byte_str/struct.ByteStr.html:58: broken link fragment `#method.to_ascii_lowercase` pointing to `core/byte_str/struct.ByteStr.html`
core/byte_str/struct.ByteStr.html:1388: broken link - `core/byte_str/slice::sort_by_key`
alloc/byte_str/struct.ByteStr.html:162: broken link fragment `#method.sort_by_key` pointing to `core/primitive.slice.html`
alloc/byte_str/struct.ByteStr.html:1592: broken link fragment `#method.sort_by_key` pointing to `core/primitive.slice.html`
alloc/byte_str/struct.ByteString.html:1000: broken link fragment `#method.sort_by_key` pointing to `core/primitive.slice.html`
alloc/byte_str/struct.ByteString.html:2369: broken link fragment `#method.sort_by_key` pointing to `core/primitive.slice.html`
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
checked links in: 24.0s
number of HTML files scanned: 62538
number of HTML redirects found: 22220
number of links checked: 2990195
number of links ignored due to external: 186158
---
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/linkchecker /checkout/obj/build/aarch64-unknown-linux-gnu/doc` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:225:77

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test --skip tidy --skip intrinsic-test --skip src/tools/rust-analyzer --skip tests --skip library --skip tidyselftest`
Currently active steps:
test::Linkcheck { host: aarch64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:162
Build completed unsuccessfully in 0:37:17
  local time: Thu Aug 27 02:54:49 UTC 2026

@clarfonthey

Copy link
Copy Markdown
Contributor Author

Right, pretty sure this is blocked by #161699 too

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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