about summary refs log tree commit diff
path: root/tests/ui/on-unimplemented/impl-substs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/on-unimplemented/impl-substs.rs')
-rw-r--r--tests/ui/on-unimplemented/impl-substs.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/on-unimplemented/impl-substs.rs b/tests/ui/on-unimplemented/impl-substs.rs
new file mode 100644
index 00000000000..fe9c50ec3d4
--- /dev/null
+++ b/tests/ui/on-unimplemented/impl-substs.rs
@@ -0,0 +1,15 @@
+#![feature(rustc_attrs)]
+
+trait Foo<A> {
+    fn foo(self);
+}
+
+#[rustc_on_unimplemented = "an impl did not match: {A} {B} {C}"]
+impl<A, B, C> Foo<A> for (A, B, C) {
+    fn foo(self) {}
+}
+
+fn main() {
+    Foo::<usize>::foo((1i32, 1i32, 1i32));
+    //~^ ERROR the trait bound `(i32, i32, i32): Foo<usize>` is not satisfied
+}