rust/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs
2025-08-04 16:43:53 -04:00

8 lines
196 B
Rust

// https://github.com/rust-lang/rust/issues/20939
trait Foo {}
impl<'a> Foo for dyn Foo + 'a {}
//~^ ERROR the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
fn main() {}