//! Test for unconstrained type parameters in inherent implementations struct MyType; struct MyType1(T); trait Bar { type Out; } impl MyType { //~^ ERROR the type parameter `T` is not constrained // T is completely unused - this should fail } impl MyType1 { // OK: T is used in the self type `MyType1` } impl MyType1 { //~^ ERROR the type parameter `U` is not constrained // T is used in self type, but U is unconstrained - this should fail } impl MyType1 where T: Bar, { // OK: T is used in self type, U is constrained through the where clause } fn main() {}