From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 1EF8D38936EC; Wed, 8 Jun 2022 12:44:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EF8D38936EC Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1215 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 9ea940e4dcabbf99fbb44c125a0af7cf82e48146 X-Git-Newrev: 74e836599ce80a11b1fe28065ed7aae6ffa3b7e2 Message-Id: <20220608124429.1EF8D38936EC@sourceware.org> Date: Wed, 8 Jun 2022 12:44:29 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 12:44:29 -0000 https://gcc.gnu.org/g:74e836599ce80a11b1fe28065ed7aae6ffa3b7e2 commit 74e836599ce80a11b1fe28065ed7aae6ffa3b7e2 Merge: 9ea940e4dca 2df8cf57e62 Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Fri May 6 12:56:12 2022 +0000 Merge #1215 1215: Report `pub restricted` violations r=CohenArthur a=CohenArthur Needs #1202. The only commit worth reviewing in the meantime is [c229c7f](https://github.com/Rust-GCC/gccrs/pull/1215/commits/c229c7f891f02c3ecd1c7b743b35edb3fc2c5539) This visitor allows us to report invalid restrictions in `pub(restricted)` visibilities. I've added documentation and an example to the visitor to explain the expected behavior. Co-authored-by: Arthur Cohen Diff: gcc/rust/Make-lang.in | 1 + gcc/rust/hir/tree/rust-hir-full-test.cc | 2 + gcc/rust/privacy/rust-privacy-check.cc | 8 +- gcc/rust/privacy/rust-pub-restricted-visitor.cc | 178 ++++++++++++++++++++++++ gcc/rust/privacy/rust-pub-restricted-visitor.h | 120 ++++++++++++++++ gcc/rust/privacy/rust-visibility-resolver.cc | 17 +-- gcc/rust/privacy/rust-visibility-resolver.h | 3 - gcc/testsuite/rust/compile/pub_restricted_2.rs | 18 +++ 8 files changed, 325 insertions(+), 22 deletions(-)