mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
17 lines
331 B
Rust
17 lines
331 B
Rust
#![feature(dyn_star)]
|
|
//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
|
|
union Union {
|
|
x: usize,
|
|
}
|
|
|
|
trait Trait {}
|
|
impl Trait for Union {}
|
|
|
|
fn bar(_: dyn* Trait) {}
|
|
|
|
fn main() {
|
|
bar(Union { x: 0usize });
|
|
//~^ ERROR `Union` needs to have the same ABI as a pointer
|
|
}
|