diff options
Diffstat (limited to 'tests/ui/kindck/kindck-impl-type-params-2.rs')
-rw-r--r-- | tests/ui/kindck/kindck-impl-type-params-2.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/kindck/kindck-impl-type-params-2.rs b/tests/ui/kindck/kindck-impl-type-params-2.rs new file mode 100644 index 000000000..8950fc51e --- /dev/null +++ b/tests/ui/kindck/kindck-impl-type-params-2.rs @@ -0,0 +1,15 @@ +trait Foo { +} + + + +impl<T:Copy> Foo for T { +} + +fn take_param<T:Foo>(foo: &T) { } + +fn main() { + let x: Box<_> = Box::new(3); + take_param(&x); + //~^ ERROR the trait bound `Box<{integer}>: Copy` is not satisfied +} |