rust/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.rs

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

14 lines
248 B
Rust
Raw Normal View History

#![expect(incomplete_features)]
#![feature(dyn_star)]
2022-11-19 04:48:01 +00:00
trait A: B {}
trait B {}
impl A for usize {}
impl B for usize {}
fn main() {
let x: Box<dyn* A> = Box::new(1usize as dyn* A);
let y: Box<dyn* B> = x;
//~^ ERROR mismatched types
}