Closed
Description
What version of regex are you using?
1.10.5
Describe the bug at a high level.
Compilation error when compiling with rust 1.82.0-nightly (7120fdac7 2024-07-25)
What are the steps to reproduce the behavior?
Compile a program that uses regex 1.10.5 with latest rust nightly with the unstable
feature enabled.
What is the actual behavior?
Running `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name regex --edition=2021 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-1.10.5/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="pattern"' --cfg 'feature="perf"' --cfg 'feature="perf-backtrack"' --cfg 'feature="perf-cache"' --cfg 'feature="perf-dfa"' --cfg 'feature="perf-inline"' --cfg 'feature="perf-literal"' --cfg 'feature="perf-onepass"' --cfg 'feature="std"' --cfg 'feature="unicode"' --cfg 'feature="unicode-age"' --cfg 'feature="unicode-bool"' --cfg 'feature="unicode-case"' --cfg 'feature="unicode-gencat"' --cfg 'feature="unicode-perl"' --cfg 'feature="unicode-script"' --cfg 'feature="unicode-segment"' --cfg 'feature="unstable"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "logging", "pattern", "perf", "perf-backtrack", "perf-cache", "perf-dfa", "perf-dfa-full", "perf-inline", "perf-literal", "perf-onepass", "std", "unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment", "unstable", "use_std"))' -C metadata=e15ac38c36a6cd7f -C extra-filename=-e15ac38c36a6cd7f --out-dir /home/runner/work/qsv/qsv/target/debug/deps -L dependency=/home/runner/work/qsv/qsv/target/debug/deps --extern aho_corasick=/home/runner/work/qsv/qsv/target/debug/deps/libaho_corasick-417a2760a2457731.rmeta --extern memchr=/home/runner/work/qsv/qsv/target/debug/deps/libmemchr-c7ff0286392b94eb.rmeta --extern regex_automata=/home/runner/work/qsv/qsv/target/debug/deps/libregex_automata-213236c3a36ea036.rmeta --extern regex_syntax=/home/runner/work/qsv/qsv/target/debug/deps/libregex_syntax-c1e3dd509c68fbb0.rmeta --cap-lints allow -C target-cpu=native`
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-1.10.5/src/pattern.rs:13:14
|
13 | impl<'r, 't> Pattern<'t> for &'r Regex {
| ^^^^^^^---- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
|
note: trait defined here, with 0 lifetime parameters
--> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:100:11
|
100 | pub trait Pattern: Sized {
| ^^^^^^^
error[E0207]: the lifetime parameter `'t` is not constrained by the impl trait, self type, or predicates
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/regex-1.10.5/src/pattern.rs:13:10
|
13 | impl<'r, 't> Pattern<'t> for &'r Regex {
| ^^ unconstrained lifetime parameter
What is the expected behavior?
Compile with nightly with unstable
feature enabled.