mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 00:24:03 +00:00
19 lines
309 B
Rust
19 lines
309 B
Rust
//@ run-pass
|
|
#![feature(dyn_star)]
|
|
#![allow(incomplete_features)]
|
|
|
|
use std::fmt::Debug;
|
|
|
|
fn make_dyn_star(i: usize) {
|
|
let _dyn_i: dyn* Debug = i;
|
|
}
|
|
|
|
fn make_dyn_star_explicit(i: usize) {
|
|
let _dyn_i: dyn* Debug = i as dyn* Debug;
|
|
}
|
|
|
|
fn main() {
|
|
make_dyn_star(42);
|
|
make_dyn_star_explicit(42);
|
|
}
|