diff options
Diffstat (limited to 'tests/ui/dyn-star/check-size-at-cast.rs')
-rw-r--r-- | tests/ui/dyn-star/check-size-at-cast.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/dyn-star/check-size-at-cast.rs b/tests/ui/dyn-star/check-size-at-cast.rs new file mode 100644 index 000000000..1f22f7983 --- /dev/null +++ b/tests/ui/dyn-star/check-size-at-cast.rs @@ -0,0 +1,10 @@ +#![feature(dyn_star)] +#![allow(incomplete_features)] + +use std::fmt::Debug; + +fn main() { + let i = [1, 2, 3, 4] as dyn* Debug; + //~^ ERROR `[i32; 4]` needs to be a pointer-sized type + dbg!(i); +} |