Skip to content
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

Rust unstable API change causes compilation error of unstable pattern feature #1231

Closed
yhx-12243 opened this issue Oct 24, 2024 · 2 comments · Fixed by #1232
Closed

Rust unstable API change causes compilation error of unstable pattern feature #1231

yhx-12243 opened this issue Oct 24, 2024 · 2 comments · Fixed by #1232

Comments

@yhx-12243
Copy link

As the title says, the rust standard library add a function to the unstable Pattern trait, so these code will cause a compilation error.

regex/src/pattern.rs

Lines 13 to 24 in bcbe403

impl<'r> Pattern for &'r Regex {
type Searcher<'t> = RegexSearcher<'r, 't>;
fn into_searcher<'t>(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
RegexSearcher {
haystack,
it: self.find_iter(haystack),
last_step_end: 0,
next_match: None,
}
}
}

BurntSushi added a commit that referenced this issue Oct 24, 2024
I am teetering on removing this cursed implementation.

Fixes #1231
@BurntSushi
Copy link
Member

#1232

@BurntSushi
Copy link
Member

This fixed in regex 1.11.1 on crates.io.

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 a pull request may close this issue.

2 participants