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

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

19 lines
309 B
Rust
Raw Normal View History

2022-06-28 21:02:30 +00:00
//@ run-pass
#![feature(dyn_star)]
2022-08-30 19:44:00 +00:00
#![allow(incomplete_features)]
use std::fmt::Debug;
2022-06-28 21:02:30 +00:00
fn make_dyn_star(i: usize) {
2022-09-14 23:20:03 +00:00
let _dyn_i: dyn* Debug = i;
}
fn make_dyn_star_explicit(i: usize) {
let _dyn_i: dyn* Debug = i as dyn* Debug;
}
2022-06-28 21:02:30 +00:00
fn main() {
make_dyn_star(42);
make_dyn_star_explicit(42);
2022-06-28 21:02:30 +00:00
}