//@ check-pass // Regression test for . // Test that we lower impossible-to-satisfy associated type bounds, which // may for example constrain impl parameters. pub trait Other {} pub trait Trait { type Assoc where Self: Sized; } impl Other for dyn Trait {} // `dyn Trait` is a different "nominal type" than `dyn Trait`. impl Other for dyn Trait {} //~^ WARN unnecessary associated type bound for dyn-incompatible associated type // I hope it's clear that `dyn Trait` (w/o `Assoc`) wouldn't match this impl. impl dyn Trait {} //~^ WARN unnecessary associated type bound for dyn-incompatible associated type fn main() {}