rust/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
2023-02-07 19:05:53 +00:00

16 lines
269 B
Rust

#![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 have the same alignment and size as a pointer
}
fn main() {}