2019-06-12 18:18:32 +03:00
|
|
|
//@ check-pass
|
2017-10-04 15:12:01 +02:00
|
|
|
|
|
|
|
|
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!() }
|
|
|
|
|
|
2018-10-31 13:08:01 +01:00
|
|
|
fn main() {
|
2019-05-28 14:46:13 -04:00
|
|
|
let t: &(u8, dyn fmt::Debug) = any();
|
2017-10-04 15:12:01 +02:00
|
|
|
println!("{:?}", &t.1);
|
|
|
|
|
}
|