rust/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
320 B
Rust
Raw Normal View History

// revisions: current next
2023-12-14 13:11:28 +01:00
//[next] compile-flags: -Znext-solver
#![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 ABI as a pointer
}
fn main() {}