rust/tests/ui/dyn-star/box.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
262 B
Rust
Raw Normal View History

2022-10-03 19:35:03 -05:00
// 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}");
}