From ca882c015d93911a8cfc0782edc8a12ce584c58b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 18 Apr 2023 11:47:29 +0200 Subject: [PATCH] Add a failing rustdoc-ui test for public infinite recursive type --- .../error-in-impl-trait/infinite-recursive-type-2.rs | 9 +++++++++ .../infinite-recursive-type-impl-trait-return.rs | 0 .../infinite-recursive-type-impl-trait-return.stderr | 0 .../infinite-recursive-type.rs} | 0 4 files changed, 9 insertions(+) create mode 100644 tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs rename tests/rustdoc-ui/{ => error-in-impl-trait}/infinite-recursive-type-impl-trait-return.rs (100%) rename tests/rustdoc-ui/{ => error-in-impl-trait}/infinite-recursive-type-impl-trait-return.stderr (100%) rename tests/rustdoc-ui/{infinite-recursive-type-impl-trait.rs => error-in-impl-trait/infinite-recursive-type.rs} (100%) diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs new file mode 100644 index 0000000000000..e49fe07981379 --- /dev/null +++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs @@ -0,0 +1,9 @@ +// check-pass + +pub fn f() -> impl Sized { + pub enum E { + V(E), + } + + unimplemented!() +} diff --git a/tests/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs similarity index 100% rename from tests/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs rename to tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.rs diff --git a/tests/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr similarity index 100% rename from tests/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr rename to tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-impl-trait-return.stderr diff --git a/tests/rustdoc-ui/infinite-recursive-type-impl-trait.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs similarity index 100% rename from tests/rustdoc-ui/infinite-recursive-type-impl-trait.rs rename to tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs