rust/tests/ui/issues/issue-33241.rs
2023-01-11 09:32:08 +00:00

13 lines
271 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);
}