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-23 17:06:05 +00: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
}
}