mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
19 lines
308 B
Rust
19 lines
308 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);
|
|
}
|