From cd19e4fac4bab0de53040db5e4daf6716dc6c47b Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 2 Sep 2023 18:59:31 +0900 Subject: [PATCH] tests: Update private_in_public test --- .../private_in_public-enum.rs | 2 +- .../pin_project/private_in_public-enum.stderr | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) rename tests/{ui/pin_project => run-pass}/private_in_public-enum.rs (87%) delete mode 100644 tests/ui/pin_project/private_in_public-enum.stderr diff --git a/tests/ui/pin_project/private_in_public-enum.rs b/tests/run-pass/private_in_public-enum.rs similarity index 87% rename from tests/ui/pin_project/private_in_public-enum.rs rename to tests/run-pass/private_in_public-enum.rs index d55baeba..4bf45416 100644 --- a/tests/ui/pin_project/private_in_public-enum.rs +++ b/tests/run-pass/private_in_public-enum.rs @@ -1,6 +1,6 @@ // Even if allows private_in_public, these are errors. -#![allow(private_in_public, dead_code)] +#![allow(private_interfaces, dead_code)] pub enum PublicEnum { V(PrivateEnum), //~ ERROR E0446 diff --git a/tests/ui/pin_project/private_in_public-enum.stderr b/tests/ui/pin_project/private_in_public-enum.stderr deleted file mode 100644 index c93b2659..00000000 --- a/tests/ui/pin_project/private_in_public-enum.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0446]: private type `PrivateEnum` in public interface - --> tests/ui/pin_project/private_in_public-enum.rs:6:7 - | -6 | V(PrivateEnum), //~ ERROR E0446 - | ^^^^^^^^^^^ can't leak private type -... -9 | enum PrivateEnum { - | ---------------- `PrivateEnum` declared as private - -error[E0446]: private type `foo::PrivateEnum` in public interface - --> tests/ui/pin_project/private_in_public-enum.rs:15:11 - | -15 | V(PrivateEnum), //~ ERROR E0446 - | ^^^^^^^^^^^ can't leak private type -... -18 | enum PrivateEnum { - | ---------------- `foo::PrivateEnum` declared as private