summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-star/box.rs
blob: d1f1819d9f35f1e49f8fb9a1aa86b463f32e8458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
// compile-flags: -C opt-level=0

#![feature(dyn_star)]
#![allow(incomplete_features)]

use std::fmt::Display;

fn make_dyn_star() -> dyn* Display {
    Box::new(42) as dyn* Display
}

fn main() {
    let x = make_dyn_star();

    println!("{x}");
}