rust/tests/rustdoc/auto-impl-for-trait.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
259 B
Rust
Raw Normal View History

2018-02-24 01:06:05 +08:00
// Test for https://github.com/rust-lang/rust/issues/48463 issue.
use std::any::Any;
use std::ops::Deref;
pub struct AnyValue {
val: Box<Any>,
}
impl Deref for AnyValue {
type Target = Any;
fn deref(&self) -> &Any {
&*self.val
}
}