blob: 4c5052a60d3f38d5871597f2ecaca4e696805c93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// compile-pass
// skip-codegen
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, fmt::Debug) = any();
println!("{:?}", &t.1);
}
|