summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs')
-rw-r--r--src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs b/src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs
new file mode 100644
index 000000000..49f111407
--- /dev/null
+++ b/src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs
@@ -0,0 +1,16 @@
+// Check that `where Self::Output: Copy` is turned into a bound on `Op::Output`.
+
+//check-pass
+
+trait Op
+where
+ Self::Output: Copy,
+{
+ type Output;
+}
+
+fn duplicate<T: Op>(x: T::Output) -> (T::Output, T::Output) {
+ (x, x)
+}
+
+fn main() {}