mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
18 lines
198 B
Rust
18 lines
198 B
Rust
//@ run-pass
|
|
pub struct _X([u8]);
|
|
|
|
impl std::ops::Deref for _X {
|
|
type Target = [u8];
|
|
|
|
fn deref(&self) -> &[u8] {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
pub fn _g(x: &_X) -> &[u8] {
|
|
x
|
|
}
|
|
|
|
fn main() {
|
|
}
|