Skip to content

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

Closed
@yhx-12243

Description

@yhx-12243

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,
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions