mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
21 lines
325 B
Rust
21 lines
325 B
Rust
//@ build-pass
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
pub trait StreamOnce {
|
|
type Error;
|
|
}
|
|
|
|
pub trait ResetStream: StreamOnce {
|
|
fn reset(&mut self) -> Result<(), Self::Error>;
|
|
}
|
|
|
|
impl<'a> ResetStream for &'a str
|
|
where Self: StreamOnce
|
|
{
|
|
#[inline]
|
|
fn reset(&mut self) -> Result<(), Self::Error> {
|
|
Ok(())
|
|
}
|
|
}
|