rust/tests/ui/dyn-star/box.rs
2023-12-14 15:22:37 +01:00

20 lines
351 B
Rust

// run-pass
// revisions: current next
//[current] compile-flags: -C opt-level=0
//[next] compile-flags: -Znext-solver -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}");
}