From 4ddff03917daea2ff42a5b5a42d38bbeaa051680 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 22 Sep 2022 14:55:22 +0300 Subject: resolve: Set effective visibilities for imports more precisely Instead of setting them for all primary and additional IDs of the import, only set them for the binding's true ID. --- src/test/ui/privacy/access_levels.rs | 2 +- src/test/ui/privacy/access_levels.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/ui/privacy') diff --git a/src/test/ui/privacy/access_levels.rs b/src/test/ui/privacy/access_levels.rs index f22ef74610e..bf94d980678 100644 --- a/src/test/ui/privacy/access_levels.rs +++ b/src/test/ui/privacy/access_levels.rs @@ -70,6 +70,6 @@ mod half_public_import { #[rustc_effective_visibility] pub use half_public_import::HalfPublicImport; //~ ERROR Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub - //~^ ERROR Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub + //~^ ERROR Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self) fn main() {} diff --git a/src/test/ui/privacy/access_levels.stderr b/src/test/ui/privacy/access_levels.stderr index 30e152e9b2e..81514d1fbab 100644 --- a/src/test/ui/privacy/access_levels.stderr +++ b/src/test/ui/privacy/access_levels.stderr @@ -112,7 +112,7 @@ error: Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub LL | pub use half_public_import::HalfPublicImport; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Public: pub, Exported: pub, Reachable: pub, ReachableFromImplTrait: pub +error: Public: pub(self), Exported: pub(self), Reachable: pub(self), ReachableFromImplTrait: pub(self) --> $DIR/access_levels.rs:72:9 | LL | pub use half_public_import::HalfPublicImport; -- cgit 1.4.1-3-g733a5