mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
18 lines
258 B
Rust
18 lines
258 B
Rust
// check-pass
|
|
|
|
struct Test<T>([T; 1]);
|
|
|
|
impl<T> std::ops::Deref for Test<T> {
|
|
type Target = [T; 1];
|
|
|
|
fn deref(&self) -> &[T; 1] {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let out = Test([(); 1]);
|
|
let blah = out.len();
|
|
println!("{}", blah);
|
|
}
|