mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
272 B
Rust
12 lines
272 B
Rust
//@ check-pass
|
|
|
|
use std::fmt;
|
|
|
|
// CoerceUnsized is not implemented for tuples. You can still create
|
|
// an unsized tuple by transmuting a trait object.
|
|
fn any<T>() -> T { unreachable!() }
|
|
|
|
fn main() {
|
|
let t: &(u8, dyn fmt::Debug) = any();
|
|
println!("{:?}", &t.1);
|
|
}
|