about summary refs log tree commit diff
path: root/tests/rustdoc/assoc/assoc-item-cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/assoc/assoc-item-cast.rs')
-rw-r--r--tests/rustdoc/assoc/assoc-item-cast.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/assoc/assoc-item-cast.rs b/tests/rustdoc/assoc/assoc-item-cast.rs
new file mode 100644
index 00000000000..17b7cf6f0da
--- /dev/null
+++ b/tests/rustdoc/assoc/assoc-item-cast.rs
@@ -0,0 +1,14 @@
+#![crate_name = "foo"]
+
+pub trait Expression {
+    type SqlType;
+}
+
+pub trait AsExpression<T> {
+    type Expression: Expression<SqlType = T>;
+    fn as_expression(self) -> Self::Expression;
+}
+
+//@ has foo/type.AsExprOf.html
+//@ has - '//pre[@class="rust item-decl"]' 'type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;'
+pub type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;