summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-33241.rs
blob: 5f9f1e4a74211d803fe41107194ce0822f5f18cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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);
}