diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/wf/wf-inherent-impl-method-where-clause.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs b/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs new file mode 100644 index 000000000..eb50fc010 --- /dev/null +++ b/src/test/ui/wf/wf-inherent-impl-method-where-clause.rs @@ -0,0 +1,17 @@ +// Test that we check where-clauses on inherent impl methods. + +#![feature(associated_type_defaults)] + +#![allow(dead_code)] + +trait ExtraCopy<T:Copy> { } + +struct Foo<T,U>(T,U); + +impl<T,U> Foo<T,U> { + fn foo(self) where T: ExtraCopy<U> //~ ERROR E0277 + {} +} + + +fn main() { } |