mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
19 lines
310 B
Rust
19 lines
310 B
Rust
//@ check-pass
|
|
|
|
// This used to ICE, because the compiler confused a pointer-like to dyn* coercion
|
|
// with a c-like enum to integer cast.
|
|
|
|
#![feature(dyn_star)]
|
|
#![expect(incomplete_features)]
|
|
|
|
enum E {
|
|
Num(usize),
|
|
}
|
|
|
|
trait Trait {}
|
|
impl Trait for E {}
|
|
|
|
fn main() {
|
|
let _ = E::Num(42) as dyn* Trait;
|
|
}
|