about summary refs log tree commit diff
path: root/tests/ui/dyn-compatibility/dyn-compatible-trait-implementation-20939.rs
blob: c7938b275e944f38f64c024b300a4eb74fba7231 (plain)
1
2
3
4
5
6
7
// 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() {}