about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-09-11 03:01:25 +0000
committerLzu Tao <taolzu@gmail.com>2020-09-13 05:27:10 +0000
commit7dd4582f95f0e07349cd34be0a5417280ce1d45b (patch)
tree5c9a98cda627921760302f4594c8e38157d8be20
parent498dab02562a67d503fc1cf0eca0968f44cfecfa (diff)
downloadrust-7dd4582f95f0e07349cd34be0a5417280ce1d45b.tar.gz
rust-7dd4582f95f0e07349cd34be0a5417280ce1d45b.zip
Add ui test for 74672 and 76571
These tests will fall without the next commit.
-rw-r--r--src/test/rustdoc/auxiliary/real_gimli.rs13
-rw-r--r--src/test/rustdoc/auxiliary/realcore.rs15
-rw-r--r--src/test/rustdoc/issue-75588.rs18
3 files changed, 46 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/real_gimli.rs b/src/test/rustdoc/auxiliary/real_gimli.rs
new file mode 100644
index 00000000000..80d5c4ba8bb
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/real_gimli.rs
@@ -0,0 +1,13 @@
+// aux-build:realcore.rs
+
+#![crate_name = "real_gimli"]
+#![feature(staged_api, extremely_unstable)]
+#![unstable(feature = "rustc_private", issue = "none")]
+
+extern crate realcore;
+
+#[unstable(feature = "rustc_private", issue = "none")]
+pub struct EndianSlice;
+
+#[unstable(feature = "rustc_private", issue = "none")]
+impl realcore::Deref for EndianSlice {}
diff --git a/src/test/rustdoc/auxiliary/realcore.rs b/src/test/rustdoc/auxiliary/realcore.rs
new file mode 100644
index 00000000000..e0a906df002
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/realcore.rs
@@ -0,0 +1,15 @@
+#![crate_name = "realcore"]
+#![feature(staged_api)]
+#![unstable(feature = "extremely_unstable", issue = "none")]
+
+#[unstable(feature = "extremely_unstable_foo", issue = "none")]
+pub struct Foo {}
+
+#[unstable(feature = "extremely_unstable_foo", issue = "none")]
+pub trait Join {}
+
+#[unstable(feature = "extremely_unstable_foo", issue = "none")]
+impl Join for Foo {}
+
+#[stable(feature = "faked_deref", since = "1.47.0")]
+pub trait Deref {}
diff --git a/src/test/rustdoc/issue-75588.rs b/src/test/rustdoc/issue-75588.rs
new file mode 100644
index 00000000000..835ed02ac00
--- /dev/null
+++ b/src/test/rustdoc/issue-75588.rs
@@ -0,0 +1,18 @@
+// ignore-tidy-linelength
+// aux-build:realcore.rs
+// aux-build:real_gimli.rs
+
+// Ensure unstably exported traits have their Implementors sections.
+
+#![crate_name = "foo"]
+#![feature(extremely_unstable_foo)]
+
+extern crate realcore;
+extern crate real_gimli;
+
+// issue #74672
+// @!has foo/trait.Deref.html '//*[@id="impl-Deref-for-EndianSlice"]//code' 'impl Deref for EndianSlice'
+pub use realcore::Deref;
+
+// @has foo/trait.Join.html '//*[@id="impl-Join-for-Foo"]//code' 'impl Join for Foo'
+pub use realcore::Join;