diff options
Diffstat (limited to 'src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs')
-rw-r--r-- | src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs new file mode 100644 index 000000000..e19e36cc7 --- /dev/null +++ b/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs @@ -0,0 +1,15 @@ +#![feature(dyn_star)] +#![allow(incomplete_features)] + +use std::fmt::Debug; + +fn dyn_debug(_: (dyn* Debug + '_)) { + +} + +fn polymorphic<T: Debug + ?Sized>(t: &T) { + dyn_debug(t); + //~^ ERROR `&T` needs to be a pointer-sized type +} + +fn main() {} |