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.

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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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