diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-10-23 15:20:18 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-23 15:20:18 +0530 |
| commit | 0b3e018137fa911a3c67aec6be4d4d67c75cfee8 (patch) | |
| tree | c9442434066d7ba74bdb37fa5577ec3fe74cc005 /src/test | |
| parent | 8440b09d1705c0c0120b7c6cb2c74d128136d2d4 (diff) | |
| parent | ba4834c092ed524e7839d21ea40a644db6e6555f (diff) | |
| download | rust-0b3e018137fa911a3c67aec6be4d4d67c75cfee8.tar.gz rust-0b3e018137fa911a3c67aec6be4d4d67c75cfee8.zip | |
Rollup merge of #103249 - petrochenkov:revaddids, r=oli-obk
resolve: Revert "Set effective visibilities for imports more precisely" In theory the change was correct, but in practice the use of import items in HIR is limited and hacky, and it expects that (effective) visibilities for all (up to) 3 IDs of the import are set to the value reflecting (effective) visibility of the whole syntactic `use` item rather than its individual components. Fixes https://github.com/rust-lang/rust/issues/102352 r? `@oli-obk`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/privacy/access_levels.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/privacy/access_levels.stderr | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ui/privacy/access_levels.rs b/src/test/ui/privacy/access_levels.rs index cc074a4f958..42c9975bedb 100644 --- a/src/test/ui/privacy/access_levels.rs +++ b/src/test/ui/privacy/access_levels.rs @@ -70,5 +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 fn main() {} diff --git a/src/test/ui/privacy/access_levels.stderr b/src/test/ui/privacy/access_levels.stderr index 19199a3eb87..111e02bc329 100644 --- a/src/test/ui/privacy/access_levels.stderr +++ b/src/test/ui/privacy/access_levels.stderr @@ -112,6 +112,12 @@ 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 + --> $DIR/access_levels.rs:72:9 + | +LL | pub use half_public_import::HalfPublicImport; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: Public: pub(crate), Exported: pub, Reachable: pub, ReachableFromImplTrait: pub --> $DIR/access_levels.rs:14:13 | @@ -124,5 +130,5 @@ error: Public: pub(crate), Exported: pub, Reachable: pub, ReachableFromImplTrait LL | type B; | ^^^^^^ -error: aborting due to 21 previous errors +error: aborting due to 22 previous errors |
