Files
rust/tests/ui/impl-trait/bare-trait-object-return.rs
2026-06-01 14:13:08 +02:00

16 lines
305 B
Rust

//! Regression test for <https://github.com/rust-lang/rust/issues/18107>.
pub trait AbstractRenderer {}
fn _create_render(_: &()) ->
dyn AbstractRenderer
//~^ ERROR return type cannot be a trait object without pointer indirection
{
match 0 {
_ => unimplemented!()
}
}
fn main() {
}