summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-star/no-explicit-dyn-star-cast.rs
blob: 67240c8e8da064fa4a7efc004e1fcbe8d4fb7150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::fmt::Debug;

fn make_dyn_star() {
    let i = 42usize;
    let dyn_i: dyn* Debug = i as dyn* Debug;
    //~^ ERROR casting `usize` as `dyn* Debug` is invalid
    //~| ERROR dyn* trait objects are unstable
    //~| ERROR dyn* trait objects are unstable
}

fn main() {
    make_dyn_star();
}