about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-10-05 18:44:48 -0700
committerMichael Howell <michael@notriddle.com>2023-10-22 15:55:43 -0700
commite701e64d59b8666161ca526a3c1bf3048019c8d9 (patch)
tree8a3cf481740761852f048002ab7e1b7788dc5aa5 /tests/rustdoc
parent77da7c655ee2583f336f23f61246bc0885beaf5d (diff)
downloadrust-e701e64d59b8666161ca526a3c1bf3048019c8d9.tar.gz
rust-e701e64d59b8666161ca526a3c1bf3048019c8d9.zip
Revert "rustdoc: list matching impls on type aliases"
This reverts commit 19edb3ce808ee2b1190026b9d56cc6187e1ad9b1.
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/type-alias-impls-32077.rs62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/rustdoc/type-alias-impls-32077.rs b/tests/rustdoc/type-alias-impls-32077.rs
deleted file mode 100644
index 2108749d1a6..00000000000
--- a/tests/rustdoc/type-alias-impls-32077.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Regression test for <https://github.com/rust-lang/rust/issues/32077>.
-
-// https://github.com/rust-lang/rust/issues/32077
-#![crate_name = "foo"]
-
-pub struct GenericStruct<T>(T);
-
-impl<T> GenericStruct<T> {
-    pub fn on_gen(arg: T) {}
-}
-
-impl GenericStruct<u32> {
-    pub fn on_u32(arg: u32) {}
-}
-
-pub trait Foo {}
-pub trait Bar {}
-
-impl<T> Foo for GenericStruct<T> {}
-impl Bar for GenericStruct<u32> {}
-
-// @has 'foo/type.TypedefStruct.html'
-// We check that "Aliased type" is also present as a title in the sidebar.
-// @has - '//*[@class="sidebar-elems"]//h3/a[@href="#aliased-type"]' 'Aliased type'
-// We check that we have the implementation of the type alias itself.
-// @has - '//*[@id="impl-GenericStruct%3Cu8%3E"]/h3' 'impl TypedefStruct'
-// @has - '//*[@id="method.on_alias"]/h4' 'pub fn on_alias()'
-// @has - '//*[@id="impl-GenericStruct%3CT%3E"]/h3' 'impl<T> GenericStruct<T>'
-// @has - '//*[@id="method.on_gen"]/h4' 'pub fn on_gen(arg: T)'
-// @has - '//*[@id="impl-Foo-for-GenericStruct%3CT%3E"]/h3' 'impl<T> Foo for GenericStruct<T>'
-// This trait implementation doesn't match the type alias parameters so shouldn't appear in docs.
-// @!has - '//h3' 'impl Bar for GenericStruct<u32> {}'
-// Same goes for the `Deref` impl.
-// @!has - '//h2' 'Methods from Deref<Target = u32>'
-pub type TypedefStruct = GenericStruct<u8>;
-
-impl TypedefStruct {
-    pub fn on_alias() {}
-}
-
-impl std::ops::Deref for GenericStruct<u32> {
-    type Target = u32;
-
-    fn deref(&self) -> &Self::Target {
-        &self.0
-    }
-}
-
-pub struct Wrap<T>(GenericStruct<T>);
-
-// @has 'foo/type.Alias.html'
-// @has - '//h2' 'Methods from Deref<Target = u32>'
-// @has - '//*[@id="impl-Deref-for-Wrap%3CT%3E"]/h3' 'impl<T> Deref for Wrap<T>'
-pub type Alias = Wrap<u32>;
-
-impl<T> std::ops::Deref for Wrap<T> {
-    type Target = GenericStruct<T>;
-
-    fn deref(&self) -> &Self::Target {
-        &self.0
-    }
-}