summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc/foreigntype.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc/foreigntype.rs')
-rw-r--r--src/test/rustdoc/foreigntype.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/rustdoc/foreigntype.rs b/src/test/rustdoc/foreigntype.rs
new file mode 100644
index 000000000..891cdd5fe
--- /dev/null
+++ b/src/test/rustdoc/foreigntype.rs
@@ -0,0 +1,18 @@
+#![feature(extern_types)]
+
+extern "C" {
+ // @has foreigntype/foreigntype.ExtType.html
+ pub type ExtType;
+}
+
+impl ExtType {
+ // @has - '//a[@class="fnname"]' 'do_something'
+ pub fn do_something(&self) {}
+}
+
+pub trait Trait {}
+
+// @has foreigntype/trait.Trait.html '//a[@class="foreigntype"]' 'ExtType'
+impl Trait for ExtType {}
+
+// @has foreigntype/index.html '//a[@class="foreigntype"]' 'ExtType'