blob: 14a45687875f849865d7d8168f74996cfef697e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// 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(())
}
}
|