rust/tests/ui/mir/issue-107678-projection-with-lifetime.rs

21 lines
324 B
Rust
Raw Normal View History

2023-02-05 08:29:07 -06:00
// 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(())
}
}