summaryrefslogtreecommitdiffstats
path: root/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
blob: 9846f87142457fd21c003c635cd48b39d6f5ee74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next

#![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() {}