summaryrefslogtreecommitdiffstats
path: root/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
blob: e19e36cc7d7b5a7ed70400259361b3d009e3f5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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() {}