1
Fork 0
rust/tests/ui/dyn-compatibility/taint-const-eval.rs
2025-04-08 23:06:31 +03:00

12 lines
318 B
Rust

// Test that we do not attempt to create dyn-incompatible trait objects in const eval.
trait Qux {
fn bar();
}
static FOO: &(dyn Qux + Sync) = "desc";
//~^ ERROR the trait `Qux` is not dyn compatible
//~| ERROR the trait `Qux` is not dyn compatible
//~| ERROR the trait `Qux` is not dyn compatible
fn main() {}