Files
rust/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs

8 lines
196 B
Rust
Raw Normal View History

2025-07-13 16:25:27 -04:00
// https://github.com/rust-lang/rust/issues/20939
trait Foo {}
2019-05-28 14:46:13 -04:00
impl<'a> Foo for dyn Foo + 'a {}
//~^ ERROR the object type `(dyn Foo + 'a)` automatically implements the trait `Foo`
fn main() {}