diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-33241.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-33241.rs b/src/test/ui/issues/issue-33241.rs new file mode 100644 index 000000000..5f9f1e4a7 --- /dev/null +++ b/src/test/ui/issues/issue-33241.rs @@ -0,0 +1,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); +} |