mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
18 lines
262 B
Rust
18 lines
262 B
Rust
|
// 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}");
|
||
|
}
|