mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
20 lines
357 B
Rust
20 lines
357 B
Rust
//@ check-pass
|
|
|
|
trait RegularExpression: Sized {
|
|
type Text;
|
|
}
|
|
|
|
struct ExecNoSyncStr<'a>(&'a u8);
|
|
|
|
impl<'c> RegularExpression for ExecNoSyncStr<'c> {
|
|
type Text = u8;
|
|
}
|
|
|
|
struct FindCaptures<'t, R>(&'t R::Text) where R: RegularExpression, R::Text: 't;
|
|
|
|
enum FindCapturesInner<'r, 't> {
|
|
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
|
|
}
|
|
|
|
fn main() {}
|