2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2015-04-10 11:12:43 -07:00
|
|
|
pub trait Reader {}
|
2014-10-26 00:07:41 +02:00
|
|
|
|
|
|
|
enum Wrapper<'a> {
|
2019-05-28 14:46:13 -04:00
|
|
|
WrapReader(&'a (dyn Reader + 'a))
|
2014-10-26 00:07:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
trait Wrap<'a> {
|
|
|
|
fn wrap(self) -> Wrapper<'a>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, R: Reader> Wrap<'a> for &'a mut R {
|
|
|
|
fn wrap(self) -> Wrapper<'a> {
|
2019-05-28 14:46:13 -04:00
|
|
|
Wrapper::WrapReader(self as &'a mut dyn Reader)
|
2014-10-26 00:07:41 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {}
|