Skip to content

RegexSet: combine the build_with_diagnostics() implementations - #3515

Open
DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:RegexSet-build_with_diagnostics
Open

DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:RegexSet-build_with_diagnostics

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Contributor

The RegexSet struct had two different conditionally-compiled versions of the build_with_diagnostics() function, one when both the "__cli" feature and the "experimental" feature were enabled, and the other when the "experimental" feature was enabled but the "__cli" feature was not. The actual implementations were identical, and the only difference was that the version when the "__cli" feature was enabled had backticks in its documentation around RegexSet.

Use a single implementation when the "experimental" feature is enabled, regardless of whether the "__cli" feature is enabled; keep the version with the backticks in the documentation, and update its #[cfg] attribute.

@DanielEScherzer

Copy link
Copy Markdown
Contributor Author

Clippy failures are unrelated, #3514

@emilio

emilio commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Can you rebase?

The `RegexSet` struct had two different conditionally-compiled versions of the
`build_with_diagnostics()` function, one when both the "__cli" feature and the
"experimental" feature were enabled, and the other when the "experimental"
feature was enabled but the "__cli" feature was not. The actual implementations
were identical, and the only difference was that the version when the "__cli"
feature was enabled had backticks in its documentation around `RegexSet`.

Use a single implementation when the "experimental" feature is enabled,
regardless of whether the "__cli" feature is enabled; keep the version with the
backticks in the documentation, and update its `#[cfg]` attribute.
@DanielEScherzer
DanielEScherzer force-pushed the RegexSet-build_with_diagnostics branch from 97169e0 to 93b3fdc Compare October 19, 2026 22:00
@rustbot

rustbot commented Oct 19, 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants