summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc/assoc-item-cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc/assoc-item-cast.rs')
-rw-r--r--src/test/rustdoc/assoc-item-cast.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc/assoc-item-cast.rs b/src/test/rustdoc/assoc-item-cast.rs
new file mode 100644
index 000000000..a409d6413
--- /dev/null
+++ b/src/test/rustdoc/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 typedef"]' 'type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;'
+pub type AsExprOf<Item, Type> = <Item as AsExpression<Type>>::Expression;